September 12th, 1999, 01:14 PM
when I insert new data into a table, where is it gonna be, at the end or the beginning?
If it is the end, how do i get it to put the new data at the beginning??
September 13th, 1999, 03:50 PM
The whole concept of relational databases is that the system is responsible for storing your data, you don't have to worry where or how it is stored.
However, when returning data from a query, you can sort data on one of the columns using "ORDER BY". This could give you the first or last records entered if the ORDER BY field is a timestamp. Or if you use an auto increment integer key in your table, you could get the last record entered by using this select statement:
SELECT * FROM table WHERE id = LAST_INSERT_ID();