DQL
- selelct * from 表名;
- select 列1, 列2 ... from 表名;
- select distinct * from 表名;
- select 列名*1.5 from 表名;
- select 列1 + ifnull(列2,0) from 表名;
- select substring() from 表名;
- select 列1 [as] 别名1 ,列2 [as] 别名2 ... from 表名;
- select distinct 列名 from 表名;
- selelct * from 表名 where 列名 > 值;
- selelct * from 表名 where 列名 is not null;
- selelct * from 表名 where 列名 between 值1 and 值2;
- selelct * from 表名 where 列名 in (值1 , 值2);
- selelct * from 表名 where 列名 like '值%';
- selelct * from 表名 where 列名 like '值_';
- selelct * from 表名 where 列名 like '%值%';
- selelct * from 表名 orderby 列名 asc/desc;
- selelct * from 表名 orderby 列1 , 列2 ...;
- selelct count(*)[sum(*) max(*) min(*) avg(*)] from 表名;
- selelct 列名 , count(*) from 表名 [where ...] group by 表名;