The documentation is your friend.

long long int sqlite3_last_insert_rowid(sqlite3*);
http://sqlite.org/capi3ref.html#sqlite3_last_insert_rowid

or

begin immediate; insert; select max(id) from blah; commit;

--- jack wu <[EMAIL PROTECTED]> wrote:
> i have a table which has an ID column defined as
> INTEGER PRIMARY KEY. I'd like to know the value of the
> automatically generated ID right after the insert. is
> there anyway to get the ID without issuing another
> select? does the insert function return the ID in any
> way? if another select is necessary, what is the best
> way to do it?  this is kind of a generic problem so i
> am hoping whoever solved this issue before could share
> some thoughts. Thanks for the help.
> 
> 
> jack.
> 


---------------------------------

You a Gamer? If you're near Kansas City, ask me about the Recruits and Conquest 
conventions.
---------------------------------

The Castles of Dereth Calendar: a tour of the art and architecture of Asheron's 
Call
http://www.lulu.com/content/77264

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

Reply via email to