常用的sql语句
1.select * from table where 条件【eg name=A】:查询 默认是升序(ASC)
2.select * from table where name = A limit 100 前100条记录
2.select * from table where 列名称 like 条件【eg % A,A%,%A%】 模糊查询 ,A结尾的,A开头的,含有A的
3.select * from table where 条件 order by [列名称] desc 降序查询
4.insert into table (列名称) velues (数据)表中插入数据
5.insert into 目标表 (列名称) selected (列名称) from 来源表 两张表中有相同字段,一个表中数据插入到另一个表中
6.insert into 目标表 select * from 来源表 两张表数据一致,插入
7.update 更新数据
8.select * from table a where 条件 union select * from table b where 条件 两个表的数据合并在一起并除去重复数据
9.select * from table a where 条件 union all select * from table b where 条件 两个表的数据合并在一起,不去重
10.group by 分组