Page 1 of 1

help mysql: how to delete data of a column from date to date

Posted: Tue Oct 04, 2022 6:18 am
by meteoesine
Hello
please, how is the script to delete the data of the SM1 field from the extraData table, starting from the beginning to 30 sept 2022?
tnx in advance

Re: help mysql: how to delete data of a column from date to date

Posted: Mon Oct 10, 2022 4:07 pm
by davidefa
If you mean the sql query to execute in phpmyadmin, you can use something like this:

Code: Select all

UPDATE alldataExtra SET SM1=NULL WHERE DateTime < '2022-09-30 00:00:00'
P.S.
A backup of the database is always a good idea, as these operations could be 'quite destructive'