FUNCTION sq(n) RETURNS integer AS
FUNCTION I() RETURNS integer AS
SELECT i FROM tbl
WITH ROWID as R
WHERE r = CURRENT_TRANSACTION.row(); -- obj. described in DB engine
INSERT INTO tbl VALUES(
2,SQ(N()),SELECT i||a WHERE i = N());
i a txt
2 4 '24'
I find that most (all?) databases do not allow access to column values of a row under commit. I studied solutions and would like to discuss them if this subject of interest.
In the Databases, ACID (Atomicity, Consistency, Isolation, Durability) is a set of rules you should allways respect. So reading a non-commited row is a no-no behavior. It'll break the Isolation part of it. And also could break Consistency part, too.
Only major difference between most databases is, what value you will get from a row, that is currently updated.
* In Oracle, you got the old value.
* In DB2, you had to wait until the lock is removed.
Off course, if you read a row WITH UR option, you'll get non-commited data out, but answer may be pure bull...