Sequence curval
From: Shuzi Chen <chen_at_openmarket.com>
Date: 1996/04/26
Message-ID: <3180DA3B.2781E494_at_openmarket.com>#1/1
Shuzi Chen
chen_at_openmarket.com Received on Fri Apr 26 1996 - 00:00:00 CEST
Date: 1996/04/26
Message-ID: <3180DA3B.2781E494_at_openmarket.com>#1/1
Sequence vs. identity
In the Sybase, you can use 'select _at__at_identity' to get the identity value used without requiring the transaction. When using a sequence we can do
'select sequence.curval from dual' (Does this require a transaction?, dual is a system table) to get the value used. Assume I have two processes;
Process 1 Process 2 --------- --------- insert record insert record select seq.curval from dual select seq.curval from dual
If the second record is inserted before the first process 'select'. What curval I will get from procees 1?
Shuzi Chen
chen_at_openmarket.com Received on Fri Apr 26 1996 - 00:00:00 CEST