get table id mysql code example
Example: how to get last id without max
SELECT DISTINCT customers.col
FROM tableName customers
LEFT JOIN tableName idNum
ON idNum.col > customers.col AND idNum.col IS NOT NULL
WHERE idNum.col IS NULL
SELECT DISTINCT customers.col
FROM tableName customers
LEFT JOIN tableName idNum
ON idNum.col > customers.col AND idNum.col IS NOT NULL
WHERE idNum.col IS NULL