create table r (integrity- ,
..., integrity- )
where r is the relation name, is the name of an attribute, and is the domain of that attribute. The allowed integrity-constraints include
primary key
and
check(P)
create table branch (bname char(15) not null
bcity char(30)
assets integer
primary key (bname)
check (assets >= 0))
create table student (name char(15) not null
student-id char(10) not null
degree-level char(15) not null
check (degree-level in (``Bachelors'', ``Masters'', ``Doctorate'')))
check (bname in (select bname from branch))
drop table r
This is not the same as
delete r
which retains the relation, but deletes all tuples in it.
alter table r add A D
where A is the attribute and D is the domain to be added.
alter table r drop A
where A is the attribute to be dropped.