Lines Matching refs:FROM

25   set v [catch {execsql {SELECT * FROM test1}} msg]
32 set v [catch {execsql {SELECT * FROM test1, test2}} msg]
36 set v [catch {execsql {SELECT * FROM test2, test1}} msg]
46 execsql {SELECT f1 FROM test1}
49 execsql {SELECT f2 FROM test1}
52 execsql {SELECT f2, f1 FROM test1}
55 execsql {SELECT f1, f2 FROM test1}
58 execsql {SELECT * FROM test1}
61 execsql {SELECT *, * FROM test1}
64 execsql {SELECT *, min(f1,f2), max(f1,f2) FROM test1}
67 execsql {SELECT 'one', *, 'two', * FROM test1}
74 execsql {SELECT * FROM test1, test2}
77 execsql {SELECT *, 'hi' FROM test1, test2}
80 execsql {SELECT 'one', *, 'two', * FROM test1, test2}
83 execsql {SELECT test1.f1, test2.r1 FROM test1, test2}
86 execsql {SELECT test1.f1, test2.r1 FROM test2, test1}
89 execsql {SELECT * FROM test2, test1}
92 execsql {SELECT * FROM test1 AS a, test1 AS b}
96 FROM test2, test1}
100 FROM test1, test2}
107 DELETE FROM test1;
113 INSERT INTO t3 SELECT * FROM test1;
116 SELECT * FROM t3;
123 set v [catch {execsql {SELECT count(f1,f2) FROM test1}} msg]
127 set v [catch {execsql {SELECT count(f1) FROM test1}} msg]
131 set v [catch {execsql {SELECT Count() FROM test1}} msg]
135 set v [catch {execsql {SELECT COUNT(*) FROM test1}} msg]
139 set v [catch {execsql {SELECT COUNT(*)+1 FROM test1}} msg]
143 execsql {SELECT count(*),count(a),count(b) FROM t3}
146 execsql {SELECT count(*),count(a),count(b) FROM t4}
149 execsql {SELECT count(*),count(a),count(b) FROM t4 WHERE b=5}
152 set v [catch {execsql {SELECT min(*) FROM test1}} msg]
156 set v [catch {execsql {SELECT Min(f1) FROM test1}} msg]
160 set v [catch {execsql {SELECT MIN(f1,f2) FROM test1}} msg]
164 execsql {SELECT coalesce(min(a),'xyzzy') FROM t3}
167 execsql {SELECT min(coalesce(a,'xyzzy')) FROM t3}
170 execsql {SELECT min(b), min(b) FROM t4}
173 set v [catch {execsql {SELECT MAX(*) FROM test1}} msg]
177 set v [catch {execsql {SELECT Max(f1) FROM test1}} msg]
181 set v [catch {execsql {SELECT max(f1,f2) FROM test1}} msg]
185 set v [catch {execsql {SELECT MAX(f1,f2)+1 FROM test1}} msg]
189 set v [catch {execsql {SELECT MAX(f1)+1 FROM test1}} msg]
193 execsql {SELECT coalesce(max(a),'xyzzy') FROM t3}
196 execsql {SELECT max(coalesce(a,'xyzzy')) FROM t3}
199 set v [catch {execsql {SELECT SUM(*) FROM test1}} msg]
203 set v [catch {execsql {SELECT Sum(f1) FROM test1}} msg]
207 set v [catch {execsql {SELECT sum(f1,f2) FROM test1}} msg]
211 set v [catch {execsql {SELECT SUM(f1)+1 FROM test1}} msg]
215 execsql {SELECT sum(a) FROM t3}
218 set v [catch {execsql {SELECT XYZZY(f1) FROM test1}} msg]
222 set v [catch {execsql {SELECT SUM(min(f1,f2)) FROM test1}} msg]
226 set v [catch {execsql {SELECT SUM(min(f1)) FROM test1}} msg]
233 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1<11}} msg]
237 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1<=11}} msg]
241 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1=11}} msg]
245 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1>=11}} msg]
249 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1>11}} msg]
253 set v [catch {execsql {SELECT f1 FROM test1 WHERE f1!=11}} msg]
257 set v [catch {execsql {SELECT f1 FROM test1 WHERE min(f1,f2)!=11}} msg]
261 set v [catch {execsql {SELECT f1 FROM test1 WHERE max(f1,f2)!=11}} msg]
265 set v [catch {execsql {SELECT f1 FROM test1 WHERE count(f1,f2)!=11}} msg]
272 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY f1}} msg]
276 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY -f1}} msg]
280 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1,f2)}} msg]
284 set v [catch {execsql {SELECT f1 FROM test1 ORDER BY min(f1)}} msg]
289 SELECT f1 FROM test1 ORDER BY 8.4;
294 SELECT f1 FROM test1 ORDER BY '8.4';
299 SELECT f1 FROM test1 ORDER BY 'xyz';
307 SELECT * FROM t5 ORDER BY 1;
312 SELECT * FROM t5 ORDER BY 2;
317 SELECT * FROM t5 ORDER BY 3;
323 SELECT * FROM t5 ORDER BY 2, 1 DESC;
328 SELECT * FROM t5 ORDER BY 1 DESC, b;
333 SELECT * FROM t5 ORDER BY b DESC, 1;
341 set v [catch {execsql {SELECT max(f1) FROM test1 ORDER BY f2}} msg]
351 set v [catch {execsql2 {SELECT f1 FROM test1 ORDER BY f2}} msg]
356 set v [catch {execsql2 {SELECT f1 FROM test1 ORDER BY f2}} msg]
360 set v [catch {execsql2 {SELECT f1 as 'f1' FROM test1 ORDER BY f2}} msg]
364 set v [catch {execsql2 {SELECT * FROM test1 WHERE f1==11}} msg]
368 set v [catch {execsql2 {SELECT DISTINCT * FROM test1 WHERE f1==11}} msg]
373 set v [catch {execsql2 {SELECT * FROM test1 WHERE f1==11}} msg]
377 set v [catch {execsql2 {SELECT DISTINCT * FROM test1 WHERE f1==11}} msg]
381 set v [catch {execsql2 {SELECT f1 as xyzzy FROM test1 ORDER BY f2}} msg]
385 set v [catch {execsql2 {SELECT f1 as "xyzzy" FROM test1 ORDER BY f2}} msg]
389 set v [catch {execsql2 {SELECT f1 as 'xyzzy ' FROM test1 ORDER BY f2}} msg]
393 set v [catch {execsql2 {SELECT f1+F2 as xyzzy FROM test1 ORDER BY f2}} msg]
397 set v [catch {execsql2 {SELECT f1+F2 FROM test1 ORDER BY f2}} msg]
401 set v [catch {execsql2 {SELECT test1.f1+F2 FROM test1 ORDER BY f2}} msg]
406 set v [catch {execsql2 {SELECT test1.f1+F2 FROM test1 ORDER BY f2}} msg]
411 set v [catch {execsql2 {SELECT test1.f1+F2, t1 FROM test1, test2
416 set v [catch {execsql2 {SELECT A.f1, t1 FROM test1 as A, test2
421 set v [catch {execsql2 {SELECT A.f1, f1 FROM test1 as A, test1 as B
426 set v [catch {execsql2 {SELECT A.f1, B.f1 FROM test1 as A, test1 as B
431 set v [catch {execsql2 {SELECT A.f1, f1 FROM test1 as A, test1 as A
436 set v [catch {execsql2 {SELECT A.f1, B.f1 FROM test1 as A, test1 as B
442 SELECT f1 FROM test1 UNION SELECT f2 FROM test1
449 SELECT f1 FROM test1 UNION SELECT f2+100 FROM test1
457 SELECT f1 FROM test1 WHERE f2=;
463 SELECT f1 FROM test1 UNION SELECT WHERE;
468 set v [catch {execsql {SELECT f1 FROM test1 as 'hi', test2 as}} msg]
473 SELECT f1 FROM test1 ORDER BY;
479 SELECT f1 FROM test1 ORDER BY f1 desc, f2 where;
485 SELECT count(f1,f2 FROM test1;
488 } {1 {near "FROM": syntax error}}
491 SELECT count(f1,f2+) FROM test1;
497 SELECT f1 FROM test1 ORDER BY f2, f1+;
503 execsql {SELECT f1 FROM test1 WHERE 4.3+2.4 OR 1 ORDER BY f1}
507 SELECT f1 FROM test1 WHERE ('x' || f1) BETWEEN 'x10' AND 'x20'
513 SELECT f1 FROM test1 WHERE 5-3==2
522 FROM test1 ORDER BY f1
528 FROM test1 ORDER BY f1
538 db eval {SELECT * FROM test1 WHERE f1<0} r {}
544 db eval {SELECT * FROM test1 WHERE f1<0} r {}
549 db eval {SELECT * FROM test1 WHERE f1<(select count(*) from test2)} r {}
554 db eval {SELECT * FROM test1 ORDER BY f1} r {}
559 db eval {SELECT * FROM test1 WHERE f1<0 ORDER BY f1} r {}
568 SELECT f1 AS x FROM test1 ORDER BY x
573 SELECT f1 AS x FROM test1 ORDER BY -x
578 SELECT f1-23 AS x FROM test1 ORDER BY abs(x)
583 SELECT f1-23 AS x FROM test1 ORDER BY -abs(x)
588 SELECT f1-22 AS x, f2-22 as y FROM test1
593 SELECT f1-22 AS x, f2-22 as y FROM test1 WHERE x>0 AND y<50
601 DELETE FROM t3;
602 DELETE FROM t4;
605 SELECT * FROM t3, t4;
610 SELECT * FROM t3, t4;
615 SELECT * FROM t3 AS x, t4 AS y;
620 SELECT t3.*, t4.b FROM t3, t4;
625 SELECT "t3".*, t4.b FROM t3, t4;
630 SELECT t3.*, t4.b FROM t3, t4;
635 SELECT x.*, y.b FROM t3 AS x, t4 AS y;
640 SELECT t3.b, t4.* FROM t3, t4;
645 SELECT t3.b, t4.* FROM t3, t4;
650 SELECT x.b, y.* FROM t3 AS x, t4 AS y;
655 SELECT t5.* FROM t3, t4;
660 SELECT t3.* FROM t3 AS x, t4;
665 SELECT t3.* FROM t3, (SELECT max(a), max(b) FROM t4)
670 SELECT t3.* FROM (SELECT max(a), max(b) FROM t4), t3
675 SELECT * FROM t3, (SELECT max(a), max(b) FROM t4) AS 'tx'
680 SELECT y.*, t3.* FROM t3, (SELECT max(a), max(b) FROM t4) AS y
685 SELECT y.* FROM t3 as y, t4 as z
689 # Tests of SELECT statements without a FROM clause.
708 DELETE FROM t3;
710 SELECT * FROM t3 UNION SELECT 3 AS 'a', 4 ORDER BY a;
715 SELECT 3, 4 UNION SELECT * FROM t3;
720 SELECT * FROM t3 WHERE a=(SELECT 1);
725 SELECT * FROM t3 WHERE a=(SELECT 2);
730 SELECT x FROM (
731 SELECT a,b FROM t3 UNION SELECT a AS 'x', b AS 'y' FROM t4 ORDER BY a,b
737 SELECT z.x FROM (
738 SELECT a,b FROM t3 UNION SELECT a AS 'x', b AS 'y' FROM t4 ORDER BY a,b