Answers for "sql case when exists in another table"

SQL
0

sql case when exists in another table

SELECT A.name, 
       CASE WHEN B.name IS NOT NULL
       THEN 'common'
       ELSE 'not common'
       END

FROM table1 A
LEFT JOIN table2 B
ON A.name = B.name
Posted by: Guest on January-08-2022

Code answers related to "SQL"

Browse Popular Code Answers by Language