Tuesday, 22 September 2015



FOREIGN KEY Constraints




create table student(Roll_no number(10) primary key, Student_name varchar2(20), Dept_name varchar2(5));

insert into student(Roll_no, Student_name, Dept_name) values (1001,'jhon','cse');
insert into student(Roll_no, Student_name, Dept_name) values (1002,'smith','it');
insert into student(Roll_no, Student_name, Dept_name) values (1003,'willy','me');
 

create table player(Roll_no number(10)references student(roll_no),Student_name varchar2(20), collage_name varchar2(20), game_name varchar2(5));

No comments:

Post a Comment