首頁 返回 下一步 最後一頁 摘要 圖形
Constraint(二)
primary key的另一種寫法:
- create table service
- (sid integer,
- name character (20) default '菜鳥廠商',
- area character (6),
- tel character (16),
- addr character (50) constraint snu unique,
- primary key (sid)
- );
unique 限制不重複
- insert into service (sid,addr) values('5','台灣');
- insert into service (sid,addr) values('6','台灣');