DROP TABLE VENKAT_SAMPLETABLE CREATE TABLE VENKAT_SAMPLETABLE(ID INT)
INSERT INTO VENKAT_SAMPLETABLE VALUES(1) INSERT INTO VENKAT_SAMPLETABLE
VALUES(0) INSERT INTO VENKAT_SAMPLETABLE VALUES(0) INSERT INTO
VENKAT_SAMPLETABLE VALUES(1)
SELECT * FROM VENKAT_SAMPLETABLE
UPDATE VENKAT_SAMPLETABLE SET ID=
( CASE WHEN ID=1 THEN
0 WHEN ID=0 THEN
1 END)
SELECT * FROM VENKAT_SAMPLETABLE
|