Jason Axelrod
Jason Axelrod

Reputation: 7805

MySQL SHOW CREATE TABLE parameters?

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

Answers (2)

Menelaos
Menelaos

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

Itay Moav -Malimovka
Itay Moav -Malimovka

Reputation: 53603

ahhh...simple...no, you can't. Check docs

Upvotes: 0

Related Questions