Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

Perfect solution if some records deleted for LAST_ID

SELECT AUTO_INCREMENT - 1 as CurrentId FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbname' AND TABLE_NAME = 'tablename'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Perfect #solution #records #deleted
ADD COMMENT
Topic
Name
7+4 =