Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting data steructures to SQL text

Status
Not open for further replies.

PeterMac

Programmer
Mar 9, 2001
51
0
0
CA
Hello:

Is there a way in Access to export (or just show for cut & paste process) the table structures in the CREATE TABLE style? I have created tables in Access and I want to convert them to MySQL without having to re-create them manually. Any help appreciated.

Peter
 
If you have a MYSQL ODBC driver you should be able to export the tables from MS Access to the DSN you designate with the driver. I've done this with Oracle and the concept should be the same.

Mike Pastore

Hats off to (Roy) Harper
 
So I guess the real answer is "no" ???
 
Actually, the "real" answer is yes. If you want to dig deep into the tables and fields collection you can code the DDL yourself by examining the field datatypes and imputing the MYSQL equivalent to these (i.e. is a MS Access LONG INTEGER also a LONG in MYSQL, etc). This will prove tedious but in the end you will have something to share with this forum.

The more practical answer is to try to use existing tools or methods to do the same. Another way I have done this is to use a tool such as Erwin to read the schema and generate DDL for the target schema. I don't think Erwin addresses mysql, however.

Good luck.

Mike Pastore

Hats off to (Roy) Harper
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top