Last active
June 18, 2019 09:07
-
-
Save Cabeda/a5d510357688a579288eae0a7eec9dc1 to your computer and use it in GitHub Desktop.
Check if two tables have the same columns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Check different columns | |
select znew.column_name as newcol, | |
zold.column_name as oldcol | |
from ( | |
select column_name | |
from information_schema.columns | |
where table_schema = 'zendesk' | |
and table_name = '_groups') zold | |
full join | |
(select column_name | |
from information_schema.columns | |
where table_schema = 'zendesk_new' | |
and table_name = 'group') znew on znew.column_name = zold.column_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment