(六)数据表的管理
- 数据表管理
表:数据库中用于存放同一实例数据的逻辑概念
了解常用数据类型
创建,修改,删除表
例:create/drop table us(phone_no char(11) not null primary key,password varchar(20) not null);
alter table *** add colum ("***" char(5) not null);/drop colum "***";/modify "***" varchar(10);
约束管理
例:
唯一约束键 alter table RECEIVE_ADDR add constraint UQ_receive_phone unique (receive_phone);
外键联系 alter table basic add constraint fr_phone_no foreign key (phone_no) references us(phone_no);
- DMSQL分类
DML(数据操作,操作数据库对象中的数据): insert update delete select
DDL( 数据定义,操作数据库对象本身): crea