1 echo CREATE TABLE t1(f1 INT, f2 CHAR(10), f3 DOUBLE, f4 DATE, f5 TIMESTAMP);
2 CREATE TABLE t1(f1 INT, f2 CHAR(10), f3 DOUBLE, f4 DATE, f5 TIMESTAMP);
3 INSERT INTO t1 VALUES(90000, 'Pitter', 90000.555555, '2009-07-30', '2009-07-29 11:29:00');
4 INSERT INTO t1 VALUES(60000, 'Simran', 60000.555555, '2006-07-30', '2006-07-29 11:29:00');
5 INSERT INTO t1 VALUES(40000, 'Jemini', 40000.555555, '2004-07-30', NULL);
6 INSERT INTO t1 VALUES(60000, 'PRITAM', 60000.555555, '2006-07-30', '2006-07-29 11:29:00');
7 INSERT INTO t1 VALUES(65000, 'PITTER', 65000.555555, '2065-07-30', '2065-07-29 11:29:00');
8 INSERT INTO t1 VALUES(40000, 'JASMIN', 40000.555555, '2004-07-30', NULL);
9 INSERT INTO t1 VALUES(45000, 'jasmin', 45000.555555, '2045-07-30', '2045-07-29 11:29:00');
10 INSERT INTO t1 VALUES(60000, 'Pitter', 60000.555555, '2006-07-30', NULL);
11 INSERT INTO t1 VALUES(40000, 'kishor', 40000.555555, '2004-07-30', '2004-07-29 11:29:00');
12 INSERT INTO t1 VALUES(50000, 'Jemini', 50000.555555, '2005-07-30', '2004-08-29 11:29:00');
13 INSERT INTO t1 VALUES(40000, 'Jemini', 60000.555555, '2006-07-30', '2004-07-29 11:29:00');
14 INSERT INTO t1 VALUES(50000, 'Jemini', 70000.555555, NULL , '2004-06-29 11:29:00');
15 INSERT INTO t1 VALUES(40000, 'Sitala', 80000.555555, '2008-07-30', '2004-05-29 11:29:00');
16 echo SELECT * FROM t1;
18 echo SELECT * FROM t1 WHERE f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini';
19 SELECT * FROM t1 WHERE f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini';
20 echo SELECT * FROM t1 WHERE f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%';
21 SELECT * FROM t1 WHERE f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%';
22 echo SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND f3 BETWEEN 44999 AND 89999;
23 SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND f3 BETWEEN 44999 AND 89999;
24 echo SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND f4 IN ('2045-07-30', '2006-07-30', '2007-07-30');
25 SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND f4 IN ('2045-07-30', '2006-07-30', '2007-07-30');
26 echo SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND (f4 IN ('2045-07-30', '2006-07-30', '2007-07-30') AND f5 IS NOT NULL);
27 SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND (f4 IN ('2045-07-30', '2006-07-30', '2007-07-30') AND f5 IS NOT NULL);
28 echo SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND (f4 IN ('2045-07-30', '2006-07-30', '2007-07-30') AND f4 IS NULL AND f5 IS NOT NULL);
29 SELECT * FROM t1 WHERE (f1 = 40000 OR f1 <= 50000 OR f2 = 'Jemini' OR f2 LIKE 'Pi%') AND (f3 BETWEEN 44999 AND 89999) AND (f4 IN ('2045-07-30', '2006-07-30', '2007-07-30') AND f4 IS NULL AND f5 IS NOT NULL);