Lines Matching refs:IN

15 # focus of this file is testing the IN and BETWEEN operator.
60 # Testing of the IN operator using static lists on the right-hand side.
63 execsql {SELECT a FROM t1 WHERE b IN (8,12,16,24,32) ORDER BY a}
66 execsql {SELECT a FROM t1 WHERE b NOT IN (8,12,16,24,32) ORDER BY a}
69 execsql {SELECT a FROM t1 WHERE b IN (8,12,16,24,32) OR b=512 ORDER BY a}
72 execsql {SELECT a FROM t1 WHERE b NOT IN (8,12,16,24,32) OR b=512 ORDER BY a}
75 execsql {SELECT a+100*(b IN (8,16,24)) FROM t1 ORDER BY b}
79 set v [catch {execsql {SELECT a FROM t1 WHERE b IN (b+10,20)}} msg]
81 } {1 {right-hand side of IN operator must be constant}}
83 set v [catch {execsql {SELECT a FROM t1 WHERE b IN (max(5,10,b),20)}} msg]
85 } {1 {right-hand side of IN operator must be constant}}
87 execsql {SELECT a FROM t1 WHERE b IN (8*2,64/2) ORDER BY b}
90 set v [catch {execsql {SELECT a FROM t1 WHERE b IN (max(5,10),20)}} msg]
92 } {1 {right-hand side of IN operator must be constant}}
94 set v [catch {execsql {SELECT a FROM t1 WHERE min(0,b IN (a,30))}} msg]
96 } {1 {right-hand side of IN operator must be constant}}
98 set v [catch {execsql {SELECT a FROM t1 WHERE c IN (10,20)}} msg]
102 # Testing the IN operator where the right-hand side is a SELECT
107 WHERE b IN (SELECT b FROM t1 WHERE a<5)
114 WHERE b IN (SELECT b FROM t1 WHERE a<5) OR b==512
120 SELECT a + 100*(b IN (SELECT b FROM t1 WHERE a<5)) FROM t1 ORDER BY b
124 # Make sure the UPDATE and DELETE commands work with IN-SELECT
129 WHERE b IN (SELECT b FROM t1 WHERE a>8)
135 DELETE FROM t1 WHERE b IN (SELECT b FROM t1 WHERE a>8)
141 DELETE FROM t1 WHERE b NOT IN (SELECT b FROM t1 WHERE a>4)
146 # Do an IN with a constant RHS but where the RHS has many, many
154 WHERE a IN (
155 'Do','an','IN','with','a','constant','RHS','but','where','the',
162 # Make sure the IN operator works with INTEGER PRIMARY KEY fields.
194 SELECT a FROM ta WHERE b IN (SELECT a FROM tb);
199 SELECT a FROM ta WHERE b NOT IN (SELECT a FROM tb);
204 SELECT a FROM ta WHERE b IN (SELECT b FROM tb);
209 SELECT a FROM ta WHERE b NOT IN (SELECT b FROM tb);
214 SELECT a FROM ta WHERE a IN (SELECT a FROM tb);
219 SELECT a FROM ta WHERE a NOT IN (SELECT a FROM tb);
224 SELECT a FROM ta WHERE a IN (SELECT b FROM tb);
229 SELECT a FROM ta WHERE a NOT IN (SELECT b FROM tb);
233 # Tests of IN operator against empty sets. (Ticket #185)
237 SELECT a FROM t1 WHERE a IN ();
242 SELECT a FROM t1 WHERE a IN (5);
247 SELECT a FROM t1 WHERE a NOT IN () ORDER BY a;
252 SELECT a FROM t1 WHERE a IN (5) AND b IN ();
257 SELECT a FROM t1 WHERE a IN (5) AND b NOT IN ();
262 SELECT a FROM ta WHERE a IN ();
267 SELECT a FROM ta WHERE a NOT IN ();
273 SELECT b FROM t1 WHERE a IN ('hello','there')
278 SELECT b FROM t1 WHERE a IN ("hello",'there')
282 # Test constructs of the form: expr IN tablename
292 SELECT b FROM t1 WHERE a IN t4;
297 SELECT b FROM t1 WHERE a NOT IN t4;
302 SELECT b FROM t1 WHERE a NOT IN tb;