sql >> Base de Datos >  >> RDS >> Mysql

Obtenga la identificación de la fila insertada usando C#

MySqlCommand comm = connect.CreateCommand();
comm.CommandText = insertStatement;  // Set the insert statement
comm.ExecuteNonQuery();              // Execute the command
long id = comm.LastInsertedId;       // Get the ID of the inserted item