Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identifying database for a specific command
Message
From
22/03/2011 14:49:51
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Scripting
Title:
Identifying database for a specific command
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01504553
Message ID:
01504553
Views:
80
If I have the following command:
IF EXISTS(SELECT 1 FROM sys.objects WHERE OBJECT_ID = OBJECT_ID(N'MyTable') AND type = (N'U')) PRINT 'TEST'
How can I adjust it to have it bound to another database then the one the script window is defaulting to?
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
Next
Reply
Map
View

Click here to load this message in the networking platform