6
Answers

How can we change 1 to 0 and 0 to 1 in a column of sql sever

Mayank

Mayank

6y
680
1
For Example:
 
DECLARE @ProductTotals TABLE
(
IsExpired bit
)
INSERT INTO @ProductTotals (IsExpired) values(1),(0)
 
I need a output : first row 0 second row 1.
 
Do not use case operator.
Answers (6)