Reputation: 75
I have a table with 4 columns like this:
Date Col1 Col2 Col3
27/03/2012 data data data
28/03/2012 data data data
I want to delete data from Col1 and Col2 from the row where date is 27/03/2012. Can anybody tell me how the query must be made?
Upvotes: 3
Views: 8994
Reputation: 6740
Is this what you want?
DELETE FROM tableName WHERE Col1="27/03/2012" OR Col2="27/03/2012"
Update in response to some clarifications:
To set Col2 to NULL for a particular date:
UPDATE tableName SET Col2=NULL WHERE Date="27/03/2012"
Upvotes: 10