When i insert a new record in a database table it is displayed below older records in the table.
i.e
1 first inserted record
2 second inserted record
3 third inserted record
How can i make the new records that i insert in a database table to be displayed as the newest inserted record at the top of other records that i have inserted.
i want it displayed this way
3 third inserted record
2 second inserted record
1 first inserted record
Is there a special reason why you want the rows in the database table to be in this order? Because when you retrieve the data from the database table, you can order it in any way you want before you display it.
I only want the rows to be in that order, newest at the top, i don’t know how to go about it.
Just let me know how i can make it be in that order when it is being displayed
Do what @SamA74 suggested, or if you have IDs as primary keys, they will increment each time a new record is inserted, so you could use ORDER BY id DESC also.