摘要:一、错误写法,错误信息:“在关键字 'distinct' 附近有语法错误。”。select top 10 distinct EmpName, Sex, Age, DeptName from tbEmployee order by EmpName二、正确写法,解析:distinct要放到top前面,先将数据distinct去重复,然后再取其中的前10行。select distinct top 10 EmpName, Sex, Age, DeptName from tbEmployee order by EmpName
阅读全文
posted @ 2011-07-27 09:51
浙公网安备 33010602011771号