Hello,
Ralf Müller wrote:
I'm very happy with rubyDBI (thanks michael). Especially DBI::Utils::XMLFormatter.table is great.
What i'm looking for is a XMLFormatter for the table definition.
As a first approach :
DBI::Utils::XMLFormatter.table(dbh.select_all("show fields from counter"))
seems ok to me.
But where are the FOREIGN KEY definitions?
How can i get them out of the database without doing "show create table <tablename>"?
Is there a special DBI command or a special MySQL command?
I dont know about MySQL, but in MaxDB/SapDB you can do:
SELECT * FROM SYSODBCCOLUMNS where TABLE_NAME='xxx_table'
This gives you a list with the relations.
Regards,
Roland
···
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: E-Mail-Adresse erstellen kostenlos | FreeMail