Hi!

Gregory Machin wrote:
Hi all.
Please could you advise.
I would like to know if one could do a recursive search through a data
base and get a result of wich column and field is holding the string ?

SQL (the language) always requires the table and column name to be given as constant text within the statement, you cannot use variables there.
(Sole exception: "SELECT *" for the list of columns to return.)

If you want to search through all columns of all tables, you need an application that first determines the list of tables, for each table that of its columns, then for each combination generates a

    SELECT col FORM tab WHERE col = 'string'

and executes it (ignoring the wrong datatype if the column is a numeric one).

As an alternative, you can take a plain text dump of the database and scan this.

HTH,
Jörg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to