0
I have two tables:
Works I need to return the values of the links table, but first I need to see if it exists in the Works table, and if it exists it must have been inserted more than 24h, otherwise this record cannot be returned in the query.
Consult and return only what I do not have in the Works table is easy, I do so:
SELECT *
FROM links l
WHERE NOT EXISTS
(
SELECT *
FROM works w
WHERE w.linkId = l.linkId
)
But I need to return only the records entered more than 24 hours