Re: building sets in SQL92
Date: Sat, 21 Jul 2001 23:29:44 GMT
Message-ID: <3b1d28a8$1_at_rpc1284.daytonoh.ncr.com>
"Per Schröder" <per_at_nospam.mimer.se> wrote in message
news:Xns90B5D56BF52F6pescatmimer_at_192.71.97.199...
> "James Chapman" <Jim.Chapman_at_nospam.elsegundoca.ncr.com> wrote in
> <3b17fbcd$1_at_rpc1284.daytonoh.ncr.com>:
>
> >That will work in DB2, but it is not part of SQL-92.
> >
> >"Aakash Bordia" <a_bordia_at_hotmail.com> wrote in message
> >news:9f8nt8$10ts$1_at_stlnews.stl.ibm.com...
> >> values('boston') union values('ny')
> >> will work
> >> Thanks
> >> Aakash
>
> That construct is indeed valid in full SQL-92.
>
Ah, so it is. I have stared at that page in the SQL-92 document many times but somehow managed not to notice that the rule for <query expression> is satisfied, several levels deeper, by <table value constructor> .
Now, noting that a table value constructor can specify multiple row values, an even simpler SQL statement that solves the problem would be:
VALUES ('boston'), ('ny') Received on Sun Jul 22 2001 - 01:29:44 CEST
