phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <>
Subject Re: Selecting from a sequence
Date Wed, 09 Apr 2014 05:27:01 GMT
We should support statements without any FROM clause for cases like this.
That way you could do something like this:
In the meantime, there are a couple of workarounds:
- do the NEXT VALUE FOR in the UPSERT statement, as this is the most common
use case
- use a table where you know there will be rows, like the SYSTEM.SEQUENCE
table or the SYSTEM.CATALOG table. Best to put a LIMIT clause on your
SELECT so you don't select the entire table each time.


On Tue, Apr 8, 2014 at 6:26 PM, Dan Di Spaltro <>wrote:

> So I created a new table and sequence.  My typical pattern for that is
> selecting from the sequence using a table, but I noticed if the table is
> empty it doesn't select anything.  While in practice this won't really be a
> problem but it's a pain when testing, is this intended behavior?
> Thanks!
> -Dan
> --
> Dan Di Spaltro

View raw message