Computer Science, asked by iamdeepak3617, 1 year ago

How to find which tables are present in a database of sql server?

Answers

Answered by clue
0

You can use this to check if a table exists;

IF (EXISTS (SELECT *  

                FROM INFORMATION_SCHEMA.TABLES  

                WHERE TABLE_SCHEMA = 'TheSchema'  

                AND  TABLE_NAME = 'TheTable'))

BEGIN

   --Do Stuff

END

Similar questions