Question : Delete rows older then todays date

Hi there

I have a table called Books and a column called Date_Updated (which contains a data field)

I need a DELETE statement that will delete all rows where Date_Updated is less then todays date.

Thanks

Answer : Delete rows older then todays date

DELETE FROM Books
WHERE Date_Updated < DateAdd(dd, DateDiff(dd, 0, GetDate()), 0)
Random Solutions  
 
programming4us programming4us