Check in sys.servers
:
if not exists(select * from sys.servers where name = N'myserver\devdb_1')
More Related Contents:
- Max Nbr of Months W/ No Activity in Past 12 Months
- SQL server query to output the data shown below
- Will ANSI JOIN vs. non-ANSI JOIN queries perform differently?
- How do I generate a random number for each row in a T-SQL select?
- SQL Server Linked Server Example Query
- Combine multiple results in a subquery into a single comma-separated value
- How do you view ALL text from an ntext or nvarchar(max) in SSMS?
- Floor a date in SQL server
- How to drop a table if it exists?
- Create a view with ORDER BY clause
- What does ‘COLLATE SQL_Latin1_General_CP1_CI_AS’ do?
- INSERT INTO vs SELECT INTO
- Possible to store value of one select column and use it for the next one?
- How FOR XML PATH(”) works when concatenating rows
- Get dates from a week number in T-SQL
- Scheduled run of stored procedure on SQL server
- SQL Server ORDER BY date and nulls last
- SQL Server variable columns name?
- What is the Oracle equivalent of SQL Server’s IsNull() function?
- SQL Recursive CTE: Finding objects linked by property
- PRINT statement in T-SQL
- T-sql – determine if value is integer
- Convert decimal time to hours and minutes
- SQL Query Where Column = ” returning Emoji characters 🎃 and 🍰
- FOR JSON PATH results in SSMS truncated to 2033 characters
- How Can I Detect and Bound Changes Between Row Values in a SQL Table?
- SQL SERVER – Understanding how MIN(text) works
- Pivot multiple columns based on one column in SQL Server
- @@ERROR and/or TRY – CATCH
- How to calculate difference in hours (decimal) between two dates in SQL Server?