H hbffff Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-16 #1 如何返回某个查询的最后一条记录 例,返回order表customer_id=10098的最后一条记录
T terry_lzs Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-16 #2 select top 1 * from order where customer_id=10098 order by fields desc fields是你需要排序的记录,如果只是要最后生成的那条记录可能你需要加自增字段来判断了
select top 1 * from order where customer_id=10098 order by fields desc fields是你需要排序的记录,如果只是要最后生成的那条记录可能你需要加自增字段来判断了