请帮忙填写这个sql字符串?我希望得到表1中的第1条记录createddate
=最新/最新。
Select TOP 1 * From Table1 Where CreateDate = "latest date??"
答案 0 :(得分:1)
另一种方法:
select * From Table1 order by CreateDate DESC Limit 1
答案 1 :(得分:1)
或没有TOP
,使用子查询:
Select *
From Table1
Where CreateDate = (select max(CreateDate) from Table1)
;
答案 2 :(得分:0)
使用order by
Select TOP 1 * From Table1 order by createddate desc