开发者

how to find a sql field name that has a record like '%text%'

i want to search all teh fields in my DB to find the field names that have in them a strin开发者_StackOverflow中文版g that contains some text.

im trying to find a table and field responsible for some 3rd party software actions that i am aonly able to see the values for. i want to use these values to find the table and field they are stored in.


like this

select column_name,table_name
 from information_schema.columns
where column_name like '%text%'

Misunderstood your question, see here: Search all columns in all the tables in a database for a specific value


This may help you:

http://blog.sqlauthority.com/2008/08/05/sql-server-2005-get-field-name-and-type-of-database-table/


I don't have specific answer. But i use PHP code for MySQL that calls "show tables" and then for each table calls "show create table [table_name]" I export the result to a text file and then search it...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜