how to get the latest record for something in sql code example Example: get latest record in sql ex: SELECT TOP 1 * FROM [TABLENAME] ORDER BY id DESC