theshowmecanuck
Programmer
I am trying to write some pseudo dynamic sql to generate a script. It is something I have done much of in Oracle and SQL Server, but I can't figure out the data dictionary for MySQL
Example (what I would do in Oracle):
select "select " || column_name || " from " || table_name || ";"
from user_tab_columns
where column_name like 'col%'
and table_name like 'tab%';
This would generate output something like this:
select col1 from tab1;
select col2 from tab1;
select col3 from tab2;
select col4 from tab3;
...
So, what would be the equivilent of 'user_tab_columns' and the other data dictionary views? I sure hope there is one.
Thanks in advance.
Example (what I would do in Oracle):
select "select " || column_name || " from " || table_name || ";"
from user_tab_columns
where column_name like 'col%'
and table_name like 'tab%';
This would generate output something like this:
select col1 from tab1;
select col2 from tab1;
select col3 from tab2;
select col4 from tab3;
...
So, what would be the equivilent of 'user_tab_columns' and the other data dictionary views? I sure hope there is one.
Thanks in advance.