Created
May 2, 2014 11:24
-
-
Save dkalamari/bc0d8340421cd1c405c5 to your computer and use it in GitHub Desktop.
C# Oracle last inserted id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string sqlInsert = "INSERT INTO users (name, surname) VALUES (:name, :surname) RETURNING id_user INTO :LASTID"; | |
OracleParameter lastId = new OracleParameter(":LASTID", OracleDbType.Int32); | |
lastId.Direction = ParameterDirection.Output; | |
... | |
cmdInsert.Parameters.Add(lastId); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment