I want search a specific value in my database that i don't know where is it exactly. Is there any query exist that returned column name or table name of a specific value in SQL server? Assume that I have a value of a column like 123, but I don't know 123 belongs to which table and I don't know any about its column name. Can i write a query to find table names that this value is in it? I need a query not a procedure!!!
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- What is the best way to do a search in a large fil
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
相关文章
- What is the complexity of bisect algorithm?
- Entity Framework 4.3.1 failing to create (/open) a
- Code for inserting data into SQL Server database u
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
- Is recursion good in SQL Server?
This might do it for you. Note that if you have a lot of tables/columns this might take quite a while. If you're not searching in
(N)VARCHAR
columns, you might want to add those types to thec.DATA_TYPE NOT IN(...
clause. Or any other type you're not looking in (likeFLOAT
orDECIMAL
).