Home >Database >Mysql Tutorial >mysql相关流程工程函数_MySQL

mysql相关流程工程函数_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:29:471060browse

bitsCN.com


mysql相关流程工程函数
 

Java代码  SELECT IF(t.name in('张三','李四'),'1111',t.name) from test t;  Java代码  SELECT CASE WHEN t.name in('张三','李四') > 0 THEN 1 ELSE t.name end from test t;  

 

 

 可以直接使用in来判断多重条件 注意括号的使用

 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn