Notice
Recent Posts
Recent Comments
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Archives
Today
In Total
관리 메뉴

A Joyful AI Research Journey🌳😊

SQL: using SET, END 본문

💻Bootcamp Self-Study Revision✨/Spring, Spring Boot, Java, SQL

SQL: using SET, END

yjyuwisely 2023. 6. 15. 12:26

value가 2개인 (Y/N) 값을 쉽게 바꿔준다.

UPDATE
    	medical_supplies 
    SET
    	visible = CASE 
	        WHEN visible = 'Y' THEN 'N'
	        WHEN visible = 'N' THEN 'Y'
    END
    WHERE
    	name = 'Tridol';
728x90
반응형
Comments