mysql - Sql query for deleting rows before a certain year -


how can delete rows before year(say 2012) in mysql, date column in datetime format? ex:

delete table_name date<2012; 

is not working.

you can way:

delete tablename date < '2012-01-01 00:00:00'; 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -