| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: building sets in SQL92
"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 Sat Jul 21 2001 - 18:29:44 CDT
![]() |
![]() |