cat > script <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
create t (a char (10,1), b);
insert into t values
('one', 1,
 'two', 2,
 'three', 3,
 'four', 4,
 'five', 5,
 'six', 6);
create n (aa char (10,1), bb);
insert into n values ('*o*', 2, '*f*', 4);

select from t where b = (select bb from n);
select from t where b = any (select bb from n);
select from t where b = all (select bb from n);

select from t where b + 1 = (select bb from n);
select from t where b + 1 = any (select bb from n);
select from t where b + 1 = all (select bb from n);

select from t where b + 1 < (select bb from n);
select from t where b + 1 < any (select bb from n);
select from t where b + 1 < all (select bb from n);

select from t where b + 1 > (select bb from n);
select from t where b + 1 > any (select bb from n);
select from t where b + 1 > all (select bb from n);

select from t where a match (select aa from n);
select from t where a match any (select aa from n);
select from t where a match all (select aa from n);

select from t where a concat 'o' match (select aa from n);
select from t where a concat 'o' match any (select aa from n);
select from t where a concat 'o' match all (select aa from n);
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 script
cat > stdout <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
* create t (a char (10,1), b);
* insert into t values
. ('one', 1,
.  'two', 2,
.  'three', 3,
.  'four', 4,
.  'five', 5,
.  'six', 6);
* create n (aa char (10,1), bb);
* insert into n values ('*o*', 2, '*f*', 4);
* 
* select from t where b = (select bb from n);
a                b

two              2
four             4
* select from t where b = any (select bb from n);
a                b

two              2
four             4
* select from t where b = all (select bb from n);
a                b

* 
* select from t where b + 1 = (select bb from n);
a                b

one              1
three            3
* select from t where b + 1 = any (select bb from n);
a                b

one              1
three            3
* select from t where b + 1 = all (select bb from n);
a                b

* 
* select from t where b + 1 < (select bb from n);
a                b

one              1
two              2
* select from t where b + 1 < any (select bb from n);
a                b

one              1
two              2
* select from t where b + 1 < all (select bb from n);
a                b

* 
* select from t where b + 1 > (select bb from n);
a                b

two              2
three            3
four             4
five             5
six              6
* select from t where b + 1 > any (select bb from n);
a                b

two              2
three            3
four             4
five             5
six              6
* select from t where b + 1 > all (select bb from n);
a                b

four             4
five             5
six              6
* 
* select from t where a match (select aa from n);
a                b

one              1
two              2
four             4
five             5
* select from t where a match any (select aa from n);
a                b

one              1
two              2
four             4
five             5
* select from t where a match all (select aa from n);
a                b

four             4
* 
* select from t where a concat 'o' match (select aa from n);
a                b

one              1
two              2
three            3
four             4
five             5
six              6
* select from t where a concat 'o' match any (select aa from n);
a                b

one              1
two              2
three            3
four             4
five             5
six              6
* select from t where a concat 'o' match all (select aa from n);
a                b

four             4
five             5
* 
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 stdout
cat > tag <<'+-+-+-+-+-END-OF-FILE-+-+-+-+-+'
Test qualification of the form: expression operator sub_query.
+-+-+-+-+-END-OF-FILE-+-+-+-+-+
chmod 644 tag
