Created
May 15, 2013 23:11
-
-
Save Alcar32/5588153 to your computer and use it in GitHub Desktop.
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
/* This sql script checks if table with name TEST_TBL exists. | |
* The resultset of this query is column name '1' with one row, | |
* if the row contains a greate than '1' then the table exists. | |
* If it '0' the table doesn't exist. | |
* | |
*/ | |
select count(*) from SYS.SYSTABLES, SYS.SYSCOLUMNS | |
where SYS.SYSTABLES.TABLEID=SYS.SYSCOLUMNS.REFERENCEID | |
and SYS.SYSTABLES.TABLENAME = 'TEST_TBL'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment