Bug #4522 Create table alter if exists
Submitted: 12 Jul 2004 18:13 Modified: 22 Dec 2005 18:06
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any

[12 Jul 2004 18:13] Olaf van der Spek
Description:
I'd like to see an addition to the create table command.
If the table doesn't exist, this command should just create the table.
If it does exist, this command should drop any fields that are not in the new definition and add any fields that are not in the old definition.
If fields exist in both, but differ, it should try to convert those fields.

How to repeat:
create table alter if exists <create definition>
[22 Dec 2005 18:06] Valeriy Kravchuk
Thank you for a feature request. Sorry, but I do not think that this feature is really neded (I see nothing similar in any other RDBMS). We have ALTER TABLE statement to change table's structure.