in reply to Re^3: How to query mysql database schema with DBI
in thread How to query mysql database schema with DBI
Then from the unix command line you can just:
This way, you have a copy of the original schema.cat mytable_schema.sql |mysql -u [user] -p
If it doesnt create correctly, you can modify the file easily enough to fix the problem.
If you ever make changes with ALTER, the original schema is still available.
Also, if you ever want to make an identical table, you already have the schema, or if you want to make a similar table, you can modify a copy of this file.
Yeah, in a lot of ways its like doing it from a script that you can run over and over, but doing it from a script is more complicated and less portable.
|
|---|