Folks, I have the following table:
CREATE TABLE IF NOT EXISTS users(
userid CHAR(100) NOT NULL,
assetid text NOT NULL,
Assuming your date
column holds different timestamps for each item, by using the ORDER BY
clause:
SELECT * FROM users WHERE userid=foo ORDER BY "date";
However, if you inserted a large number of records in a single transaction, the date
column value will probably be the same for all of them - if so, there is no way to tell which was inserted first (from the information given).