On Sun, 06 Nov 2005 15:09:34 -0500, [EMAIL PROTECTED] wrote:
> Alexander Kozlovsky <[EMAIL PROTECTED]> wrote:
> > I just notice, SQLite don't support this type of queries:
> >
> >
> > select * from t1 where a >= ALL (select b from t2)
> >
> >
> > Of course, queries with ALL, ANY and SOME clauses may be reformulated,
> > but this is part of SQL standard.
>
> What are these constructs suppose to do?
[from the sql 1992 standard]
8.7 <quantified comparison predicate>
Function
Specify a quantified comparison.
Format
<quantified comparison predicate> ::=
<row value constructor> <comp op> <quantifier> <table subquery>
<quantifier> ::= <all> | <some>
<all> ::= ALL
<some> ::= SOME | ANY
Syntax Rules
1) The <row value constructor> shall be of the same degree as the
result of the <table subquery>.
2) The data types of the values of the <row value constructor>
shall be respectively comparable to those of the columns of the
<table subquery>.
3) The collating sequence for each pair of respective values in
the <quantified comparison predicate> is determined in the same
manner as described in Subclause 8.2, "<comparison predicate>".
Access Rules
None.
General Rules
1) Let R be the result of the <row value constructor> and let T be
the result of the <table subquery>.
2) The result of "R <comp op> <quantifier> T" is derived by the
application of the implied <comparison predicate> "R <comp op>
RT" to every row RT in T:
Case:
a) If T is empty or if the implied <comparison predicate> is
true for every row RT in T, then "R <comp op> <all> T" is
true.
b) If the implied <comparison predicate> is false for at least
one row RT in T, then "R <comp op> <all> T" is false.
c) If the implied <comparison predicate> is true for at least
one row RT in T, then "R <comp op> <some> T" is true.
d) If T is empty or if the implied <comparison predicate> is
false for every row RT in T, then "R <comp op> <some> T" is
false.
e) If "R <comp op> <quantifier> T" is neither true nor false,
then it is unknown.
+---------------------------------------+-----------------+
: Klint Gore : "Non rhyming :
: EMail : [EMAIL PROTECTED] : slang - the :
: Snail : A.B.R.I. : possibilities :
: Mail University of New England : are useless" :
: Armidale NSW 2351 Australia : L.J.J. :
: Fax : +61 2 6772 5376 : :
+---------------------------------------+-----------------+