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
help mysql: how to delete data of a column from date to date
- meteoesine
- Forecaster
- Posts: 148
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2 + BloomSky cam
- Software: Meteobridge nano
- Contact:
-
- Expert
- Posts: 712
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: help mysql: how to delete data of a column from date to date
If you mean the sql query to execute in phpmyadmin, you can use something like this:
P.S.
A backup of the database is always a good idea, as these operations could be 'quite destructive'
Code: Select all
UPDATE alldataExtra SET SM1=NULL WHERE DateTime < '2022-09-30 00:00:00'
A backup of the database is always a good idea, as these operations could be 'quite destructive'