应该这样: select id,tt from book group by id,tt order by id desc但其结果未必是你想要的 :(
select max(id),tt from book group by tt order by id desc
select min(id),tt from book group by tt order by id desc
select * from (select id,tt from book group by id,tt) AA order by id desc
select min(id) as id, tt from book group by tt order by id
select tt from book group by tt order by min(id)
select min(id) as id, tt from book group by tt order by id
显示的错误如下: Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 列名 'infoStudy.ID' 在 ORDER BY 子句中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句中。 /gaojiao_03.asp,行22
tj_dns(愉快的登山者) sky_blue(老衲) 说的是对的
你用老衲的这个不行吗?? select tt from book group by tt order by min(id)仔细检查一下!
select id,tt from book group by id,tt order by id desc但其结果未必是你想要的 :(
Microsoft OLE DB Provider for SQL Server 错误 '80040e14' 列名 'infoStudy.ID' 在 ORDER BY 子句中无效,因为该列既不包含在聚合函数中,也不包含在 GROUP BY 子句中。 /gaojiao_03.asp,行22
sky_blue(老衲)
说的是对的
select tt from book group by tt order by min(id)仔细检查一下!