Retrieve next auto_increment value in BEFORE Trigger

from the Artful MySQL Tips List


In the Trigger ...

  set @nextauto = (select auto_increment 
                   from information_schema.tables 
                   where table_schema=Database() and table_name='your table name'
                  );




Return to the Artful MySQL Tips page