SqlCommand d = new SqlCommand("select  * from [Table1] where id in(Select min(id) FROM Table1 group by Usertype) and S_Id" = +Sid);上面的语句是想:从表中按变量Sid等于字段S_ID查询Usertype,因为Usertype有重复的记录。只查询id最小的那条。语句没有错误。就是上面的查询字符串 单引号 双引号 不会标了。Sid是int型