select  a.id,a.mobile,distinct a.msgid,  a.gwid,a.spcode, a.linkid,a.momsg,case a.feeflag 
when '1'then '计费' when '0' then '不计费' end feeflag,case a.userType when '1'then ' 
普通用户' when '2' then '测试号码' when '3' then '黑名单用户'end userType, a.cpproductID, 
a.serviceType,b.opno,b.name, c.Enterprise_id,c.EnterpriseName,a.optime ,b.money from message a, 
Tb_Operation b , Tb_Enterprise c where b.opno=a.momsg and  c.Enterprise_id=a.cpproductID and a.id> = 1 
我的意思 是在上面的SQL语中我要把msgid字段的数据有很多重复的数据,我想在读取数据的时候msgid重复的数据不要读出来,我用到了distinct a.msgid 但会报错误 
在关键字 'distinct' 附近有语法错误。 请那位兄弟指点一下,先谢过了.