MrSigma

Untitled

May 9th, 2021
1,587
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WITH virtual_table(id, username, firstname) AS (
  2.     SELECT
  3.         id,
  4.         username,
  5.         firstname
  6.     FROM
  7.         users_table
  8. )
  9.  
  10. SELECT
  11.     id,
  12.     username
  13. FROM
  14.     virtual_table
  15.  
  16. UNION ALL
  17.  
  18. SELECT
  19.     firstname,
  20. FROM
  21.     virtual_table
RAW Paste Data