You are on page 1of 1

SQL> alter table student_info add constraint cn1 check (activity IN('Project','C ultural','Sports')); Table altered.

SQL> alter table branch_details add constraint branch_pk unique(branch_name); Table altered. SQL> alter table branch_details add constraint branch_pk_code primary key(branch _code); Table altered. SQL> alter table branch_details add constraint branch_pk_code primary key(branch _code); Table altered. SQL> alter table stud_info add constraint stud_fk foreign key(branch_code) refer ences branch_details(branch_code) on delete cascade; Table altered. SQL> alter table lab_data add constraint lab_pk primary key(item_code); Table altered. SQL> alter table book_details add constraint book_pk unique(title); Table altered. SQL> create table train_details(train_no number(5) constraint p primary key,trai n_name varchar2(15) not null); Table created. SQL> create table passenger_details(pnr_no number(5) constraint prkey primary ke y,train_no number(5) constraint fkkey references train_details(train_no) on dele te cascade,train_name varchar2(15) not null,boarding varchar2(12),destination va rchar2(12)); Table created.