Skip to content

Instantly share code, notes, and snippets.

@gongpeione
Created July 14, 2015 10:02
Show Gist options
  • Save gongpeione/e0b8549d7321465e8f95 to your computer and use it in GitHub Desktop.
Save gongpeione/e0b8549d7321465e8f95 to your computer and use it in GitHub Desktop.
create temporary table with tables name
SELECT *
FROM
(
SELECT *, 'cdk_record_07' as tableName FROM cdk_record_07
UNION ALL
SELECT *, 'cdk_record_01' as tableName FROM cdk_record_01
) s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment