SQL Query to find specific data in current database


Problem

Some of the time we are unable to find the table and its corresponding column in which the data resides. This usually happens when we have more than 100 tables in SQL Server OR it may happens when the developer is new to the application. Then this type of the problem arises.

Solution

Following is SQL query which find the table and column in which the specific data resides in it.

Let see the query.

 Sql query to find specific data in database
Academy4Code | Sql query to find specific data in database

 

 

 

 

 

As in the above screen, you have seen that, we need to find the text “Senior Tool Designer” using sql query in the “AdventureWorks2012” database. So we have executed the SQL query and find the corresponding TableName, ColumnName and ColumnValue.

please let me know, if you find some more query, or consult over email at academy4Code@gmail.com

Ravindra Kumar is a Programmer and an independent consultant from India. He has been a part of the industry for more than 6 years. During his career, he has worked on mutiple projects of the USA and of India (Technology Evangelist at Microsoft). He received his Bachelors of Engineering from Punjan Technical University. He has been a regular speaker of SQL Sessions in Indian IT Company.

For more, you can consult at ravindra@Academy4Code.com