我将一行插入ORACLE数据库表中,其中 主键ID是自动增量。 和 我正在从该表重试自动增量的ID。在Oracle数据库中获取正确的自动增加的ID
在许多人使用相同的表的情况下。 我可能会遇到消费者生产者问题,我可能会在其中获得其他用户的ID号码为 。
一些用户对SO提到有关获取这些递增ID 是基于connection,不会在消费者生产者造成 问题:
只是想检查下面的事情与SO:
第一:
我会得到确切的自动递增ID从下面sceneario:
1) Two computer with in different subnet using DB.
2) Two computer wiht in same subnet using DB.
3) Two process using using DB connection.
4) Two thread uisng DB connection.
二:
If my insert is:
Insert into Tables (ID,NAME,DESCRIPTION) values (DBNull,'Name','Description');
What should be my query to get the autoincremented ID generated for above
Insert.
C# related command will do much help :)
对不起回复迟到。我想你正在谈论存储过程。但是我不能在DataBase Side中改变任何东西 – vrbilgi 2011-01-03 10:21:59