Reputation: 212
Please help complete this sql string? I want to get 1st record from table 1 where createddate
= most recent/latest.
Select TOP 1 * From Table1 Where CreateDate = "latest date??"
Upvotes: 1
Views: 34
Reputation: 8395
Or without TOP
, using subquery:
Select *
From Table1
Where CreateDate = (select max(CreateDate) from Table1)
;
Upvotes: 1
Reputation: 1244
the other way to do it:
select * From Table1 order by CreateDate DESC Limit 1
Upvotes: 1