0
I have a database in which one of the tables has the designation "Products" and I would like to extract from it the last 4 items inserted in it. The column with the main key (Primary key) is autoincriment.
When doing the Sql query, using "Limit 4" is enough to fetch the last 4, or not? Or does it make the process easier to create within the table a column of type datetime, in which whenever a new item is inserted this saves the date and time when it was inserted?
P.S.: I am using Mysql database
You want to know the last 4 records recorded by any system user, or you want to know the last 4 records entered in a single INSERT?
– Allan Andrade