|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I need to return the Identity of a inserted record with a Stored Procedure
Someone can help me? Thanks |
|
#2
|
|||
|
|||
|
Hi,
Firebird doesn't have an "identity" attribute. Therefore, I assume you mean a newly generated value via a Generator, is that right? Probably the best way to do this, if you're inserting the record via a Stored Procedure, is this: create procedure MyProc (<input parameters>) returns (NewID: Integer) as begin newid = gen_id(mygenerator, 1); insert into mytables (idcolumn, <other values>) values (newid, <input parameters). end; -- With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Returning ID |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|