From owner-freebsd-questions Tue Jun 4 12: 3: 8 2002 Delivered-To: freebsd-questions@freebsd.org Received: from smtp.tninet.se (sheridan.tninet.se [195.100.94.102]) by hub.freebsd.org (Postfix) with ESMTP id AD35637B401 for ; Tue, 4 Jun 2002 12:02:48 -0700 (PDT) Received: from pcmarpxy.tninet.se (bb-62-5-36-29.bb.tninet.se [62.5.36.29]) by sheridan.tninet.se (BMR ErlangTM/OTP 3.0) with ESMTP id 797955.217171.1023.1s4471324sheridan ; Tue, 04 Jun 2002 20:59:31 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Mark Rowlands To: Eric Boucher , FreeBSD Subject: Re: SQL question: how to find in all tables? Date: Tue, 4 Jun 2002 21:02:43 +0200 User-Agent: KMail/1.4.1 References: <20020604172821.72740.qmail@web9402.mail.yahoo.com> In-Reply-To: <20020604172821.72740.qmail@web9402.mail.yahoo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200206042102.43087.mark.rowlands@minmail.net> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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= =20 > total newbie in that field). I have search over the internet in some = =20 > tutorials, but I didn't found the answer: > > 1. > Is it possible to list every table that contains a certain name in a co= lumn:=20 > for example, suppose that I know that I have a couple of table which h= as a=20 > column that has this column in it. dunno which sort of sqlyou are referring to but with mysql, you could use= perl=20 / dbi to dig this info out or just run mysqldump -d -u someuser -p -A=20 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 datab= ase=20 that has the string "toto" in it somewhere?=20 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=20 > 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