0

I am working with a really messed up DB that has a a lot of tables and some of the tables have huge numbers of columns with bad naming making this impossible to find anything specific.

I need a select operation for finding the table that has one of the columns equal to one specific value, by checking the values from each column of every table. Is that possible?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Ovy.Istrate
  • 474
  • 3
  • 15

2 Answers2

1

This is may be what you are looking for Search all fields in SQL Server Database

Sagar Shirke
  • 648
  • 9
  • 32
0

Yes, you can do the query: "select name_of_column from name_of_table where id = x"

Nikilonga
  • 19
  • 10
  • The problem is that, you don't know the name of the column , or the table, just the value, and you make a huge search in all tables and for each table in all columns to see if you have a matching row with that value that you know – Ovy.Istrate Jun 02 '15 at 09:11
  • Can´t you search the name of the tablespaces? – Nikilonga Jun 02 '15 at 09:19