Maybe the simplest way ;)

CREATE SEQUENCE someTableSeq; 

CREATE TABLE someTable
( 
   ID INTEGER NOT NULL DEFAULT NEXT VALUE FOR someTableSeq, 
   .... 
) 

insert into someTable (firstname, lastname, address, phone, email)
  values ('Henry', 'Higgins', '27A Wimpole Street', '3231212', null)
  returning lastname, fullname, id

--
View this message in context: 
http://firebird.1100200.n4.nabble.com/Simplify-MySQL-migration-LAST-INSERT-ID-tp3163991p4335952.html
Sent from the firebird-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to