Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lisber-SQL-Example(CASE)
SELECT a.* INTO #lisber FROM ( SELECT 1 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 1 as 'id' UNION ALL SELECT 0 as 'id' UNION ALL SELECT 1 as 'id' ) as a SELECT CASE a.id WHEN 0 THEN a.id+2 WHEN 1 THEN a.id+3 END as 'changedId' FROM #lisber a DROP TABLE #lisber
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
DBMS 4/9/20
Turn column into string
SQLERROR
My notes
Libros
Rno 37 boat
SQL Server - UK Holiday Calendar Example
program2
Demo
employee table
Please log in to post a comment.