Mayank

Mayank

  • NA
  • 474
  • 24k

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

Jul 30 2018 8:24 AM
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)