摘要:
1、建表插数据查询(需要对case有一定了解) 1 create table A 2 ( 3 s varchar(20), 4 b varchar(20) 5 ) 6 7 insert into a values('赤井','SQL入门') 8 insert into a values('赤井',' 阅读全文
摘要:
1、比较多列数据最大值 1 select 2 case 3 when 列名1>列名2 and 列名2>列名3 then 列名1 4 when 列名2>列名3 then 列名3 5 else 列名3 end 6 from 表名 2、自定义排序 1 select * from 表名 order by 2 阅读全文