web-dev-qa-db-fra.com

PostgreSQL: CHOISIR OERE moins de 15 minutes

Dans le tableau events ci-dessous, comment sélectionner events créé il y a moins de 15 minutes?

CREATE TABLE events (
    created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
32
ma11hew28
SELECT created_at FROM events WHERE created_at > NOW() - INTERVAL '15 minutes';
61
Frank Heikens
SELECT * FROM events WHERE age(now(), created_at) < '15 minutes';
10
ma11hew28