JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

mysql常用命令

发布时间 2023-08-29 10:53:13作者: sensen~||^_^|||&

1. 通过if、case语句判断值:

select if(m.status = 1, "在库" , "借出") as status from machin_tool_ledger m
select CASE m.status WHEN 1 THEN '在库' ELSE '借出' END as status from machin_tool_ledger m
select CASE m.status WHEN 1 THEN '在库' when 0 then '借出' ELSE 'more' END as status from machin_tool_ledger m

    本栏目推荐文章
  • 解决 DELPHI 中执行外部命令出现屏幕一闪的问题的方法
  • Jmeter 如何连接mysql数据库?
  • 如何通过Navicat把MySQL远程数据库导入到本地数据库
  • Python教程(23)——Python类中常用的特殊成员
  • 50个常用的Qt开源库
  • GitHub常用搜索技巧
  • JS常用工具:Webpack 和 JShaman分别有什么用?
  • 【LeetCode 2701. 连续递增交易】MySQL用户变量编程得到严格递增连续子序列的开始位置,结束位置,长度等统计信息
  • 【Leetcode 2474. 购买量严格增加的客户】MySQL用户变量编程解决严格递增连续子序列问题
  • mysql发生连接异常Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们