|
DDL : Data Definition Language
DDL
DML
Data Definition Language
DML
Data Manipulation
Manipulatio
DML
Data Manipulation Language
SELECT INSER UPDATE REMOVE
DDL
Data Definition Language
CREATE ALTER DROP
CREATE DATABASE IF NOT EXISTS xxx CHARACTER SET UTF8
USE XXX
CREATE TABLE IF NOT EXISTS xxx {
}
DESC XXX
ALTER TABLE XXX DROP COLUMN age
ALTER TABLE XXXX ADD COLUMN XXXX TYPE
DML shu
DDL 和 DML
数据库中的DML 和DDL
DDL
Data Definition Language(数据定义语言), 关键字, CREATE、ALTER、DROP
创建数据库
CREATE DATABASE IF NOT EXISTS {dataBase} CHARACTER SET UTF8
创建表格
USE xxx;
CREATE TABLE IF NOT EXISTS {table} (
id int,
name, varchar(32),
age int
)
更改表结构
DESC {table}
ALTER TABLE {table} DROP COLUMN age;
ALTER TABLE {table} ADD CULUMN age int;
删除表, 删除数据库
DROP TABLE {table}
DROP DATABLE {database}
DML
Data Manipuation Language(数据操纵语言), 关键字, SELECT、UPDATE、DELETE、INSER
数据库表增删改查
SELECT * FROM {table}
SELECT a,b,c FROM {table}
|
|