getting all columns that match a name
George Parkinson
george at microtherapy.ca
Wed May 22 10:26:46 CDT 2013
perhaps i should reword for clarity...
is there a valentina equivalent to the sqlserver query:
SELECT table_name FROM information_schema.columns WHERE column_name = 'productID'
thanks,
george
________________________________
From: George Parkinson <george at microtherapy.ca>
To: Valentina Developers <valentina at lists.macserve.net>
Sent: Wednesday, May 22, 2013 11:08:25 AM
Subject: Re: getting all columns that match a name
yes indeed, but i'm looking for all table names that have a field 'productid' (in one query)
thanks
george
________________________________
From: Bart Pietercil <bart.pietercil at cognosis.be>
To: Valentina Developers <valentina at lists.macserve.net>
Sent: Wednesday, May 22, 2013 10:59:12 AM
Subject: Re: getting all columns that match a name
select * from (show fields of tblName) where fld_name = 'productID';
mind you check fieldname to use for fld_name by doing a 'show fields of tblName' first
hth,
Bart
On 22 May 2013, at 16:54, George Parkinson <george at microtherapy.ca> wrote:
hello all,
>
>
>i'm trying to get a list of all table names in a db that have a specific column name.
>ie all user tables with a column named 'productID'.
>
>
>do i have to use a combination of SHOW TABLES, SHOW COLUMNS, and a loop or is there simpler way?
>
>
>thanks,
>george
>
>
>
>
>
>
>
>_______________________________________________
>Valentina mailing list
>Valentina at lists.macserve.net
>http://lists.macserve.net/mailman/listinfo/valentina
>
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
_______________________________________________
Valentina mailing list
Valentina at lists.macserve.net
http://lists.macserve.net/mailman/listinfo/valentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20130522/6d903371/attachment.html>
More information about the Valentina
mailing list