Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
488 B
1
Indexable
Never
create table emp(id int primary key, name varchar(20) unique, salary int not null,age int, check(age>30));
insert into emp values(1,'Dasarath',50000,35);
insert into emp values(2,'Ram',60000,40);
insert into emp values(3,'sita',50000,35);
insert into emp values(4,'hanuman',60000,2900000);

create table dept(depid int primary key, deptname varchar(20) unique, age int , empid int, foreign key(empid) references emp(id));
insert into emp values(5,'laxman',60000,29000);
select * from emp;
Leave a Comment