-
mysql: show every column in the database
I'm looking for a column in the database and rather than dig through 50 tables i was wondering if there was a *magical* query that could do the trick.
Something to the effect of
select * from (show tables) limit 1;
i saw some where to try an use the table "Syscolumns" but i get an error:
table db.Syscolumns doesn't exist
any suggestions?
thanks
-
hah, figured it out
SELECT
column_name
FROM
information_schema.`COLUMNS` C
where
table_schema = 'mysql'
and
column_name = 'whatever' #or kill this for all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|