Subject Slq Server @@IDENTITY equivalent in FB
Author Vlad Orlovsky
Hi Everyone,

I'm still on the process of porting SQL Server DB to
Firebird.

Does anyone knows of a SQL Server @@IDENTITY
equivalent in Firebird.

Basically I have:

Active BEFORE INSERT trigger for AS_USERS at position
0
AS BEGIN
IF (NEW.USER_ID IS NULL) THEN
NEW.USER_ID = GEN_ID(AS_USERS_SEQ, 1);
END

After I do my INSERT, I need to know the value of
USER_ID to return back to the caller program.

I'm using Fb 1.5(if that helps)

Thank you once again,
Vlad


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com