ORACLE SQL DDL language
开发工具与关键技术:Oraclesql*plus PLSQL Developer
作者:黄元进
撰写时间:2019年03月25日
DDL: Data Definition Language
DDL defines the structure of the database, comparing to create, modify or delete database objects, rename the table, including the following SQL statement:
Create table: create database tables
must have: you must specify:
-create TABLE privilege - table
- storage space - the column name, data type, size,
ALTER TABLE: change the table structure, add, delete, modify the column length
ALTER TABLE ADD: append a the new column
a new column in the table is the last one
MODLFY: can modify the data type, size, and default value of the column
using the column DROPCOLUMN clause deleted are no longer needed.
use rENAME cOLUMN ***** TO clause to rename columns
delete table
data structures are removed and
all matters related to the running submitted
all the relevant index has been dropped
DROP tABLE statement can not be rolled back,
empty table
TRUNCATE tABLE statement:
delete all the data in the table
release table storage space
Note: these DDL commands after the operation, are not rolled back!