Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identifying database for a specific command
Message
From
22/03/2011 15:31:26
 
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01504553
Message ID:
01504557
Views:
21
>
>IF EXISTS (select 1 from myDB.sys.Objects WHERE OBJECT_ID = OBJECT_ID(N'MyTable') AND type = (N'U')) PRINT 'TEST'
>
>Alternatively,
>
>IF EXISTS (select 1 from MyDB.INFORMATION_SCHEMA.Tables where TABLE_Name = 'MyTable') PRINT 'TEST'
Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform