Our online program upgrades always hear what incremental script, I have no idea what happened, this certification looked at the next book, finally know it;
The so-called increment script, that is, when the upgrade of a table added an element, that is, a column of data, or a table, and so on, anyway is to increase things;
table, the following SQL statement is included:
Suppose you need to add a name column to the user table:
MySQL database:
ALTER TABLE user ADD COLUMN name VARCHAR (100);
Oracle Database:
ALTER TABLE user ADD (name VARCHAR2 (100));
If you need to add more columns, such as add name, sex, old three columns in the user table:
MySQL database:
ALTER TABLE user ADD COLUMN (name VARCHAR, sex int, old INTEGER);
Oracle Database:
ALTER TABLE user ADD (name VARCHAR, sex integer, old integer);
To delete a column from a table:
Mysql/oracle Database:
ALTER TABLE user drop name;
MySQL data I personally tested found that multiple columns could not be deleted; Delete multiple columns not tested in Oracle