Find the database by table name

Here's the scenario: 1.  You have been given a script to run.2.  You do not know the database name.3.  You know which server.Substitute the word "TABLENAME" with the table name in the script and run in query analyzer.  This query will check every database on the server and return the name of the database with […]

2 (1)

2007-04-26 (first published: )

452 reads

Blogs

Simple-Talk Article…Understanding Azure Storage Options

By

Simple- Talk is technical journal and community hub from Redgate. This week I have the pleasure of...

T-SQL Tuesday #120 – Recap

By

The wrap up post for T-SQL Tuesday #120. 9 bloggers contributed this month. The post...

Setting Certificate Backup Permissions for an Instance–#SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

Read the latest Blogs

Forums

Numeric and Decimal

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Numeric and Decimal, which is...

Union with temp table

By mcfarlandparkway

insert into dbo.details ( DetailId ,DetailName ) select distinct st.stdid ,st.name from dbo.student st...

need help with a query to avoid while loop

By mxy

i am struggling with a query to avoid while loop, please guide me if...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers

Question of the Day

Missing Data

See possible answers