MatthijsFontys

SQL Exists Query

Mar 23rd, 2021
850
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT CASE WHEN EXISTS (<SELECT STATEMENT>)
  2. THEN CAST(1 AS BIT)
  3. ELSE CAST(0 as BIT)
  4. END as [exists];
RAW Paste Data