@@identity equivalent in oracle

@@identity equivalent in oracle
Oracle uses sequences to generate unique values for identity columns. You can access the current identity value and the next value in SQL via these pseudocolumns :
  • CURRVAL: Returns the current value of a sequence

  • NEXTVAL: Increments the sequence and returns the next value

CURRVAL and NEXTVAL have to associated with a sequence. For example myTable_seq.CURRVAL or myTable_seq.NEXTVAL.

Connect to Oracle XE server from Oracle.DataAccess.Client

Here is the connection string to connect to an Oracle XE server:

"Data Source=//SERVERNAME/XE;" +

Executing Multiple Inserts in Oracle

If you are inserting multiple inserts via a .net application you will need to format your inserts like so:

"begin insert into Task values(11,'tname');insert into
Task values(12,'tname');insert into Task values(13,'tname');insert into
Task values(14,'tname');end;";