1. CREATE
CREATE DATABASE db_name;
CREATE TABLE table_name(
column_name type constraint
);
CREATE TABLE emp_sub AS
SELECT empno, ename, job, HIREDATE, sal FROM emp WHERE deptno=10;
CREATE TABLE emp_t AS
SELECT * FROM emp WHERE 1=2;
2. ALTER
ALTER TABLE persons ADD email VARCHAR(255);
ALTER TABLE emp_sub ADD deptno int DEFAULT 10;
ALTER TABLE persons MODIFY COLUMN city VARCHAR(255);
ALTER TABLE emp_sub RENAME COLUMN deptno TO dcode;
ALTER TABLE persons DROP COLUMN email;
3. DROP
DROP DATABASE db_name;
DROP TABLE table_name;
4. TRUNCATE
SELECT * FROM emp_10;
TRUNCATE TABLE emp_10;
5. RENAME
RENAME TABLE emp_sub TO emp_10;