Insert into Table and get auto_increment id

Maniac
2004-04-09
2004-04-22
  • Maniac
    Maniac
    2004-04-09

    hi

    Inserting values works fine, except that i want to get the auto_increment value of the inserted line. in mssql its @@identity. how can i get the id of the new entry?

    maniac

     

    • Anonymous
      2004-04-19

      I am having the same issue.  I thought it might be a case of setting the parameter direction to output.  But I think that the implementation is input only.  Help

       
    • eric677
      eric677
      2004-04-22

      Can use this sql statment:
      select LAST_INSERT_ID()

       
      • Maniac
        Maniac
        2004-04-22

        thank you eric677