1 echo create table emp(eno int,mgrno int,sal float,deptno int);
2 create table emp(eno int,mgrno int,sal float,deptno int);
3 echo insert into emp values(1,3,5000,10);
4 insert into emp values(1,3,5000,10);
5 echo insert into emp values(2,4,4000,20);
6 insert into emp values(2,4,4000,20);
7 echo insert into emp values(3,NULL,8000,10);
8 insert into emp values(3,NULL,8000,10);
9 echo create table dept(deptno int,dname char(10),lid int);
10 create table dept(deptno int,dname char(10),lid int);
11 echo insert into dept values(10,'IT',100);
12 insert into dept values(10,'IT',100);
13 echo insert into dept values(20,'HR',300);
14 insert into dept values(20,'HR',300);
15 echo create table loc(lid int,state char(10));
16 create table loc(lid int,state char(10));
17 echo insert into loc values(100,'Orissa');
18 insert into loc values(100,'Orissa');
19 echo insert into loc values(200,'Cal');
20 insert into loc values(200,'Cal');
21 echo insert into loc values(300,'Calif');
22 insert into loc values(300,'Calif');
23 echo select * from emp;
25 echo select * from dept;
27 echo select * from loc;
29 echo select * from emp,dept,loc;
30 select * from emp,dept,loc;
31 echo select * from emp,dept,loc where emp.deptno!=dept.deptno AND dept.lid!=loc.lid;
32 select * from emp,dept,loc where emp.deptno!=dept.deptno AND dept.lid!=loc.lid;
33 echo select * from emp,dept,loc where NOT(emp.deptno!=dept.deptno AND dept.lid!=loc.lid);
34 select * from emp,dept,loc where NOT(emp.deptno!=dept.deptno AND dept.lid!=loc.lid);