I want to add a column to a table, but I don't want it to fail if it has already been added to the table. How can I achieve this?
# Add column fails if it already exists
ALTER TABLE `TableName` ADD `ColumnName` int(1) NOT NULL default '0';
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…