On 2013-08-29 17:30, Laird Nelson wrote:
I have a column defined like this:

rowid int as convert(_rowid_, int)

The idea is that I am trying to effectively alias the _rowid_ column that H2 already adds to every table, so that I can emulate an Informix database (which adds "rowid" to every table).

When I select rowid, the value is always 0, even after inserts.


Yeah, sorry but that isn't going to work.

We calculate the value of the computed column BEFORE we store it, and at that point in time the value of __rowid__ is always zero.

You could probably create the behaviour you want a combination of views and triggers.
http://h2database.com/html/advanced.html#updatable_views


--
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/groups/opt_out.

Reply via email to