adding test scripts
[csql.git] / test / sql / Join / test013.ksh
blob03a16e02c20cc4bacfb53375df741baa075f4aa5
1 #!/bin/ksh
2 #Testing IN operator in Join
3 #create table emp(eno int,dno int);
4 #create table dept(deptno int,dname char(10));
5 #insert some records into both the tables.
6 #Test the following Select statements using join and in operator and check the retrieved data are proper or not
7 #select * from emp,dept where emp.dno in(20,30);
8 #select * from emp,dept where dept.deptno in(20,30);
9 #select * from emp,dept where emp.dno in(20,30) and dept.deptno in(20,30);
10 #select * from emp,dept where emp.dno in(20,30) or dept.deptno in(20,30);
12 QUITFILE=${PWD}/sql/Join/quit.sql
13 REL_PATH=.
14 if [ -s "$QUITFILE" ]
15 then
16 REL_PATH=`pwd`/sql/Join
19 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/join32.sql
20 if [ $? -ne 0 ]
21 then
22 exit 1;
24 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/join_in.sql
25 if [ $? -ne 0 ]
26 then
27 exit 1;
29 $CSQL_INSTALL_ROOT/bin/csql -s $REL_PATH/drop_emp_dept.sql
30 if [ $? -ne 0 ]
31 then
32 exit 1;