This was also my first thought. However, the SQL standard specifies the
following (no support for CURRVAL):

<next value expression> ::=
    NEXT VALUE FOR <sequence generator name>


For backwards-compatibility reasons (and interoperability with PostgreSQL),
I guess identifiers wrapped in string literals will still need to be
supported.

Here's how other databases implement things:

*DB2, Ingres, Oracle*

"SCHEMA"."SEQUENCE".nextval


*Sybase SQL Anywhere*

[SCHEMA].[SEQUENCE].nextval


*H2, PostgreSQL*

nextval('SCHEMA.SEQUENCE')


*Derby, Firebird, HSQLDB*

next value for "SCHEMA"."SEQUENCE"


*SQL Server*

next value for [SCHEMA].[SEQUENCE]


*CUBRID*

"SEQUENCE".next_value


Cheers,
Lukas

2014-08-12 16:01 GMT+02:00 Noel Grandin <[email protected]>:

>
> Why not just used the SQL standard for quoting identifiers:
>   NEXTVAL("Foo")
>
> ?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "H2 Database" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/h2-database/DlFc-BFsuE0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to