select DISTINCT 编号,日期 from yourtable
group by 编号,日期
order by 编号 ASC,日期 DESC
程序中可用
exec('select DISTINCT 编号,日期 from yourtable
group by 编号,日期
order by 编号 ASC,日期 DESC
')
group by 编号,日期
order by 编号 ASC,日期 DESC
程序中可用
exec('select DISTINCT 编号,日期 from yourtable
group by 编号,日期
order by 编号 ASC,日期 DESC
')
可这样只选出一个编号字段,日期字段访问不到