2012年5月29日
摘要: 一次在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 阅读全文
posted @ 2012-05-29 18:07 大乖乖 阅读(1297) 评论(0) 推荐(0) 编辑