+ Start a Discussion
rohitrrohitr 

Query to fetch only records with latest created date

How can i write an soql to fetch records from an object with created date as the most recent present in system?

 

 

Best Answer chosen by rohitr
APathakAPathak
Hi,
Try this ->
list <account> lacc = [select id from account order by createdDate DESC limit 1];