我將一行插入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