[Ur] Subqueries.

Alexei Golovko m-lj at yandex.ru
Fri Feb 24 06:24:13 EST 2012


Can you show an example of query which may be used instead of SELECTs? 

And how to represent this (working) SQL in Ur?

24.02.2012, 13:57, "Gergely Buday" <gbuday at gmail.com>:
>>  $ cat sql.ur
>>  table t : { X : int, Y : int }
>>  table s : { X : int, Y : int, Z : int }
>>  val test = dml (INSERT INTO t (X, Y) VALUES
>>     ( (SELECT s.X FROM s WHERE s.Z = 1),
>>     (SELECT s.Y FROM s WHERE s.Z = 1) )
>>  )
>
> Hi, the first SELECT gives back a list of values so clearly it cannot
> be feed to a place which expects one value. Same to the second.
>
> - Gergely



More information about the Ur mailing list