$ 0 0 Here ID is a integer with auto increment Value. It should be a Primary key. SELECT * FROM TABLE WHERE ID = (SELECT MAX(ID) FROM TABLE)