简体   繁体   中英

SQL search all table all column

I'm trying to find a value in my SQL database, but documentation doesn't tell in which table or which column is the value.

All information I have is the value "use_config_gift", and I wanna look in all table of the database for finding the text.

Is this possible ? I'm using Mysql on a terminal, and the db is a little big (560+ tables).

Anyone got an idea please ?

You can use full text search functions in MYSQL

Kindly visit the link below for references :

Full text search MySQL

Try to use this script:

http://kedar.nitty-witty.com/blog/wp-content/uploads/2009/10/find-in-all-databases-tables.sql_.txt

This script was written to search in all dbs but you can replace:

WHERE TABLE_SCHEMA NOT IN ('information_schema','test','mysql');

with:

WHERE TABLE_SCHEMA IN ('YOUR_DB_NAME');

The source :

http://kedar.nitty-witty.com/blog/search-through-all-databases-tables-columns-in-mysql

Bye!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM