正在加载图片...
Integrity Constraints in Create Table Types of integrity constraints 。primary key(A,,An) foreign key (Am,...An)references r 。not null ■ SQL prevents any update to the database that violates an integrity constraint. ■ Example: create table instructor( ID char(5), name varchar(20)not null, dept name varchar(20), salary numeric(8,2), primary key(ID), foreign key(dept_name)references department), Database System Concepts-7th Edition 3.8 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 3.8 ©Silberschatz, Korth and Sudarshan th Edition Integrity Constraints in Create Table ▪ Types of integrity constraints • primary key (A1 , ..., An ) • foreign key (Am, ..., An ) references r • not null ▪ SQL prevents any update to the database that violates an integrity constraint. ▪ Example: create table instructor ( ID char(5), name varchar(20) not null, dept_name varchar(20), salary numeric(8,2), primary key (ID), foreign key (dept_name) references department);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有