Phil Chapman
asked on
Does A Table Exist In A Database
I need a query that will check to see if a table ( PaymentType ) exist in a database. If it does exist the query needs to return a 1 if the table does not exist return a 0.
Any help in creating this query will be appreciated.
Any help in creating this query will be appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Print 'Table Exists'
ELSE
Print 'Table Does Not Exists'
where 'AdventureWorks.dbo.AWBuil
http://www.sqlservercurry.com/2007/12/check-if-database-or-table-exists-using.html