crocodile 发表于 2013-2-1 13:29:06

mysql 杂谈

1、mysql 连接字符串:
   select CONCAT('My', 'S', 'QL');
 
2、insert into bb select a,b,c from cc
 
3、mysql case when end
 
 select case when a=1 then 'ddddd'
when a=2 then 'eeee'
when a=3 then 'ffff'
else
    'fggg'
end
 
from bbb
 
4、关键字处理
 如果查询中有关键字,例如 type,desc ,
在查询的时候 要用到反引号,``
select `type` from table1;
 
 
 
页: [1]
查看完整版本: mysql 杂谈