PDA

View Full Version : get table information


jayson_13
05-21-2003, 09:52 PM
hi,

I just wondering why i can't get the foreign key constraint if i describe a table. Anybody know how to get all the table information? Thanks! Anybody have free backup tools for mysql?

Strike
05-21-2003, 11:50 PM
MySQL doesn't support foreign keys yet. So if you are using MySQL you can't have a foreign key constraint (unless you are using 4.0.x and I'm not even sure that has foreign key support). Also, there's no SQL standard for describing tables that I know of - DESCRIBE is a MySQL-ism. Just in case you care about portability.

jayson_13
05-22-2003, 01:55 AM
FYI i am using MySQL 4.1.0 alpha. And it support foreign key constraint.

Strike
05-22-2003, 11:51 AM
Okay, that does explain the foreign key bit. But I also can't seem to find the MySQL docs for 4.1 on their site, so I can't do much to help. The only thing I can suggest is that you dig through whatever documentation it came with.

iDxMan
05-30-2003, 01:21 AM
Are you using innodb tables? Foreign keys might only be avail for inno.


backup? mysqldump ..


-r

stuka
06-02-2003, 10:40 AM
From the command line client for MySQL, \dt tells you the table names in the current db, and \d TABLE_NAME tells you all about the table TABLE_NAME, including constraints.