在你将此标记为副本之前,我已经阅读了 the other question 它属于不同版本的MySQL。我正在运行下一个主要版本: MySQL version 5.0.91-community
MySQL version 5.0.91-community
如果列存在,我需要删除它,如果不存在,我还需要添加列。
如何在PHP中执行此操作?
您可能需要一个存储过程: http://bitkickers.blogspot.com/2010/01/mysql-drop-column-if-exists.html