xSea xSea - 2 years ago 63
SQL Question

Get first record by latest date

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??"

Answer Source

use order by

Select TOP 1 * From Table1 order by createddate desc
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download