List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 19 2001 12:15am
Subject:Re: Command?
View as plain text  
At 3:30 PM -0500 9/18/01, Jay Paulson wrote:
>What is the command in MySQL to grab the last item that was inserted into
>the database?
>
>thanks...
>jay

If you mean the last record, there's no such command.
If you mean the most recent AUTO_INCREMENT value what was generated
during your current session with the server, it's

SELECT LAST_INSERT_ID()


-- 
Paul DuBois, paul@stripped
Thread
MyODBC properties window / VB data environment / ADODBMikko Lampinen18 Sep
  • RE: MyODBC properties window / VB data environment / ADODBVenu18 Sep
    • Command?Jay Paulson18 Sep
      • Re: Command?Jon Drukman19 Sep
      • Re: Command?Paul DuBois19 Sep