Reputation: 7805
I am using the SHOW CREATE TABLE
command to get a create code for my table. However, I noticed that the create command is missing a few features.
For instance, it doesn't have an IF NOT EXISTS
parameter. It also lists the AUTO_INCREMENT=#
position at the end; which isn't really needed since its an auto increment.
Is there any way to add parameters to the query to fix these issues?
Upvotes: 0
Views: 2862
Reputation: 26005
I think your more interested in mysql dump that does include more information.
However, specifically for the "if not exists", you will have to replace that using a script or grep.
References:
Create table if not exists from mysqldump
Upvotes: 2