I want to edit in 'videos' table, if 'category' column has the value set to 'Music' then replace it with the value '1'.
How can i do this?
I want to edit in 'videos' table, if 'category' column has the value set to 'Music' then replace it with the value '1'.
How can i do this?
I'm a bit confused as to what you're trying to accomplish. Is 'category' a column that is currently set to 'Music' for some row, and you want to set that to 1? If so:
update videos set category = 1 where category = 'Music'
Most probably the category your are referring to is a column, and not a row. If that is true then this solution is apt:
UPDATE videos SET category = '1' WHERE category = 'Music'
Go through the following link which contains tutorials, fruitful for beginners: http://msdn.microsoft.com/en-us/library/bb264565%28v=sql.90%29.aspx
With regards,
Jayesh