climber
06-14-02, 17:57
| Hi I'm a SQL Server Programmer having a first touch with Oracle. Does anyboady know the equivalent of @@IDENTITY in PL-SQL? This is used in SQL Server to get the value of the last inserted identity field. for exemple: I have a table 'user' with an identity field 'id_user'. _______ INSERT user (name, password) VALUES ('climber','pokomoonshine') SELECT @@IDENTITY _______ Last statement is supposed to give me the value created by my INSERT statement in 'id_user', so you don't have to write SELECT MAX(id_user)... I didn't find any topics in this forum about it yet. Any help is welcome. |