人工智能,零基础入门!http://www.captainbed.net/inner
一、把特殊数据排在最前面
【1】
select * from table where name='D'
UNION ALL
select * from table where name<>'D';
【2】
SELECT CASE WHEN [name]='D' THEN 0 ELSE 1
人工智能,零基础入门!http://www.captainbed.net/inner
一、把特殊数据排在最前面
【1】
select * from table where name='D'
UNION ALL
select * from table where name<>'D';
【2】
SELECT CASE WHEN [name]='D' THEN 0 ELSE 1