Add mariadb examples
This commit is contained in:
@@ -16,5 +16,9 @@ done
|
||||
|
||||
## Append field in table
|
||||
```sql
|
||||
ALTER TABLE existsTableName ADD COLUMN `newFieldName` varchar(64) NOT NULL DEFAULT '';
|
||||
CREATE TABLE tableName_new AS (SELECT * FROM tableName);
|
||||
|
||||
ALTER TABLE tableName_new ADD COLUMN `newFieldName` varchar(64) NOT NULL DEFAULT '' AFTER `existFieldName`;
|
||||
|
||||
RENAME TABLE tableName TO tableName_old; RENAME TABLE tableName_new TO tableName;
|
||||
```
|
||||
|
Reference in New Issue
Block a user