DEV Community

select * from SQL

Posts on tips and tricks, using and learning about SQL for database development and analysis.

Posts

👋 Sign in for the ability to sort posts by relevant, latest, or top.
Your Search Query Is a Program: Composing Role-Based SQL With the Strategy Pattern

Your Search Query Is a Program: Composing Role-Based SQL With the Strategy Pattern

Comments 1
13 min read
SQL Interview Questions (With Model Answers)

SQL Interview Questions (With Model Answers)

Comments 1
4 min read
PostgreSQL Unique Constraint vs Unique Index: Which to Use, and How to Add One Without Locking the Table

PostgreSQL Unique Constraint vs Unique Index: Which to Use, and How to Add One Without Locking the Table

Comments
9 min read
Your Test Suite Is Slow Because It Tests Postgres

Your Test Suite Is Slow Because It Tests Postgres

Comments
3 min read
NL-to-SQL tools will happily DROP your table. Screen the output.

NL-to-SQL tools will happily DROP your table. Screen the output.

Comments
2 min read
Production SQLite in 2026: Running Laravel Without a Database Server

Production SQLite in 2026: Running Laravel Without a Database Server

Comments
3 min read
Why Regex SQL Converters Break on Legacy Stored Procedures and How to Fix Them)

Why Regex SQL Converters Break on Legacy Stored Procedures and How to Fix Them)

Comments
3 min read
Polymorphic Associations in PostgreSQL: One commentable_id Column or a Foreign Key per Table?

Polymorphic Associations in PostgreSQL: One commentable_id Column or a Foreign Key per Table?

Comments
7 min read
Zero updated rows do not fail a D1 batch: testing the rollback boundary

Zero updated rows do not fail a D1 batch: testing the rollback boundary

1
Comments 2
4 min read
5 SQL patterns that run fine and still return the wrong answer

5 SQL patterns that run fine and still return the wrong answer

1
Comments
4 min read
Why Your JOIN Doubled Your Totals — There's No Error, Just the Wrong Number

Why Your JOIN Doubled Your Totals — There's No Error, Just the Wrong Number

1
Comments
4 min read
NOT IN can be executed as an Anti-Join (NOT EXISTS) in PG19

NOT IN can be executed as an Anti-Join (NOT EXISTS) in PG19

Comments
7 min read
Apache Iceberg Query Optimization: Production Guide

Apache Iceberg Query Optimization: Production Guide

Comments
40 min read
ersioning Business Semantics for Enterprise AI

ersioning Business Semantics for Enterprise AI

Comments
7 min read
Window functions vs Aggregate functions

Window functions vs Aggregate functions

Comments
9 min read
👋 Sign in for the ability to sort posts by relevant, latest, or top.