how to retrieve yesteraday inserted records in a table?Note there is no timestamp column in a table
+3
A:
If you have no timestamp column or other source of relative information stored, then the only possible way is to restore yesterday's backup and compare the two databases / tables.
Edit (example provided)
SELECT * FROM today.table t1 LEFT JOIN yesterday.table t2
on t1.id = t2.id WHERE t2.id IS NULL;
This will work provided each day's backup is created before the start of the day.
Anax
2010-07-08 06:59:34
+1
A:
if u do only insert queries to this table , its Enough to store only the max id of the table (last id) per day,(if you have auto increment primary key) you can store the max id from yesterday and
select from table where id > last_max_id
Haim Evgi
2010-07-08 07:02:03