Alois
Alois

Reputation: 130

Stored Procedure Order By Latest Date

How to order DateTime by latest?

Example:

WHERE last_read BETWEEN @StartDate AND @EndDate
ORDER BY 

I am new to sql query, couldn't really understand the online explanation. Sorry and thanks

Upvotes: 0

Views: 525

Answers (1)

DancingFool
DancingFool

Reputation: 1267

You order by column_name then add DESC to order by last to first, so in your case (assuming the date is in last_read)

ORDER BY last_read DESC

Upvotes: 1

Related Questions