Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set false in specific column to all rows

I have a table with the following columns:

ID    Name 
1     test1
2     test2

Now I added new column IsConfirmed. And this column contain null in all rows.

ID    Name   IsConfirmed
1     test1     null
2     test2     null

How can I set false to IsConfirmed column to all rows in the table using T-SQL?

Thanks

like image 472
user1260827 Avatar asked May 29 '12 05:05

user1260827


1 Answers

UPDATE YourTableName
SET IsConfirmed=0
WHERE isConfirmed is Null
like image 75
JohnFx Avatar answered Oct 02 '22 22:10

JohnFx