Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2002 21:02:43 +0200
From:      Mark Rowlands <mark.rowlands@minmail.net>
To:        Eric Boucher <eric_boucher60@yahoo.com>, FreeBSD <freebsd-questions@FreeBSD.ORG>
Subject:   Re: SQL question: how to find in all tables?
Message-ID:  <200206042102.43087.mark.rowlands@minmail.net>
In-Reply-To: <20020604172821.72740.qmail@web9402.mail.yahoo.com>
References:  <20020604172821.72740.qmail@web9402.mail.yahoo.com>

index | next in thread | previous in thread | raw e-mail

On Tuesday 04 June 2002 7:28 pm, Eric Boucher wrote:
> Hi everyone,
>
> I have 2 questions for you guys regarding Sql (I have to say that I'm a     
> total newbie in that field). I have search over the internet in some       
> tutorials, but I didn't found the answer:
>
> 1.
> Is it possible to list every table that contains a certain name in a column: 
> for example, suppose that I  know that I have a couple of table which has a 
> column  that has this column in it.

dunno which sort of sqlyou are referring to but with mysql, you could use perl 
/ dbi  to dig this info out or  just run

mysqldump -d  -u someuser  -p  -A 

will dump all table descriptions for all databases.


> 2.
> Is it possible to list every table and column that has
> an entry, for example, if I want to know the exact
> tables and column where the word "toto" is listed.

hhm..  you mean any  in any field in any record of any table of any database 
that has the string "toto"  in it somewhere? 

yes, but depending on the database size. it might take a while :-)
again...mysql specific but have a look at

 http://mysql.turbolift.com/mysql/DBD_3.21.X.php3 

> If someone can also provide me a link to a good
> tutorial if you found the information on the internet,
> it will be appreciated.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206042102.43087.mark.rowlands>