Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Perl and MySql - checking tables for column names

by kschwab (Priest)
on Jan 23, 2017 at 15:16 UTC ( #1180161=note: print w/replies, xml ) Need Help??

in reply to Perl and MySql - checking tables for column names

It wouldn't be portable to databases other than mysql, but you can query directly for table names:

SELECT table_name FROM information_schema.tables;

And, then to get column names for a specific table

SELECT column_name FROM information_schema.columns WHERE table_schema += 'your_database' AND table_name = 'your_table';

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1180161]
[LanX]: YM: talking about breaches ... did you read about Cambridge Analytica harvesting 50e6 FB profiles for political propaganda?
LanX ... oh ... Brexit delayed ... again ... oh wonder ...
[Your Mother]: Heh. I keeping seeing related headlines but my narcissism is a perihelion right now so I'm busy. :P
[LanX]: https://www. news/series/ cambridge- analytica-files
[Your Mother]: s/a /at /;
[LanX]: just watch the video ...
[Your Mother]: Roger, will co.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2018-03-19 13:21 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.