摘要:
一次在sql server 2008 中写sql语句:select distinct firstname,lastname from person order by person_id错误提示:Msg 145, Level 15, State 1, Line 1ORDER BY items must appear in the select list if SELECT DISTINCT is specified.哦,原来在与distinct 一起时,order by 中出现的字段必须也在select 中出现啊!改写如下:select distinct firstname,lastname,p 阅读全文