I need to get next auto-increment ID from my mysql product Table.
This is how I tried it:
SELECT `auto_increment`
FROM INFORMATION_SCHEMA.TABLES
WHERE table_name = 'products';
When this query is running, I can get an output like this.
+----------------+
| auto_increment |
+----------------+
| 10 |
| 1 |
| 14 |
+----------------+
3 rows in set (0.02 sec)
Can anybody tell me why it shows 3 values. (3 rows)
NOTE: my product table is still empty.
mysql> select * from products;
Empty set (0.00 sec)