Posts tagged “SQL”
4 posts Subscribe by RSS
4 posts
AP Subject A #14: SQL joins, aggregation, and NULL
SQL SELECT/WHERE, INNER vs LEFT JOIN, GROUP BY/HAVING and COUNT, NULL and three-valued logic, NOT IN pitfalls and DISTINCT for AP Subject A, with five original questions.
Using a PostgreSQL table as a job queue: FOR UPDATE SKIP LOCKED and when the lock is released
How FOR UPDATE SKIP LOCKED lets several workers share jobs in one PostgreSQL table, per the official docs: lock lifetime, LIMIT and OFFSET, ORDER BY, and locking clauses inside WITH.
Why two SELECTs in one transaction can disagree: PostgreSQL READ COMMITTED and snapshots
Under PostgreSQL's default READ COMMITTED level, two SELECTs in one transaction can see different data. Learn how statement snapshots, row rechecks, and transaction retries work.
Why NOT IN returns no rows: SQL NULL and three-valued logic
One NULL in a subquery makes NOT IN return zero rows. Why, per the PostgreSQL, MySQL and SQLite docs: three-valued logic, how WHERE keeps rows, and fixing it with NOT EXISTS.
No posts match. Try another word.