Skip to content

Instantly share code, notes, and snippets.

@libraplanet
Created October 5, 2013 17:31
Show Gist options
  • Save libraplanet/6843856 to your computer and use it in GitHub Desktop.
Save libraplanet/6843856 to your computer and use it in GitHub Desktop.
SELECT
USER_INFO.ID
, USER_INFO.NAME_FAMILY || USER_INFO.NAME_FIRST
, 'A' AS TYPE
FROM
USER_INFO
WHERE
USER_INFO.AGE >= 20
WHERE
USER_INFO.MODFY >= '2012/09/07'
UNION
SELECT
OLD_USER_INFO.ID
, OLD_USER_INFO.NAME
, 'B' AS TYPE
FROM
OLD_USER_INFO
WHERE
OLD_USER_INFO.AGE >= 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment