标签:des io ar for 数据 sp art cti on
10. 复制a表的完整字段结构和索引到b表:CREATE TABLE b LIKE a;
11. CREATE TABLE inspection_info AS SELECT * FROM inspection_agency;复制内容
12. CREATE TABLE inspection_info AS SELECT * FROM inspection_agency where 1 limit 0;只复制字段结构
13. 删除数据库里面的外键约束:SET FOREIGN_KEY_CHECKS=0
14. 删完表再添加上:SET FOREIGN_KEY_CHECKS=1
15. SELECT (CASE WHEN shopid=-1 THEN madminid ELSE shopid END) AS shangjiaID FROM usercart当某个字段的值为-1时,用另一个字段的值代替,组成一个新的组
标签:des io ar for 数据 sp art cti on
原文地址:http://www.cnblogs.com/kitty111/p/3993096.html