
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get column names of a table in mySql from script?
Hello,
I'm trying to get column names from a mySql database table in a single column with the columns names.
I have a script working in dbVizualizer:
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='schema_name'
AND TABLE_NAME='table_name';
This works fine.
But when I try to run it through the QV script, I get an empty result - I'm using an ODBC connection to mySql.
Temp:
SQL
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA='schema_name'
AND TABLE_NAME='table_name';
This script in QV gets an Empty result.
Anyone?
Thanks!
Boris


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Boris,
What's the rest of your script?
Andy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Never mind, I found the problem, the parameters I passed to the TABLE name and schema weren't in the right syntax.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Boris.. If you have fixed the issue. then please close the ticket
