Post

Daisuke Matsushima
Daisuke Matsushima@damassima·
order byでのnullの扱い、各DBで異なるなとは思っていたけど、DuckDBだけascでもdescでも常に最後になるのか。(nulls firstはできる) PostgreSQLがorder by 句に式を使えないのも意外
Modern SQL@ModernSQL

ORDER BY Has Come a Long Way modern-sql.com/blog/2026-05/o… The ORDER BY clause is one of the best-known SQL clauses. Yet there are a number of common misunderstandings that are worth clearing up. The article walks you through the evolution of the ORDER BY clause in the SQL standard.

日本語
2
0
1
305
Modern SQL
Modern SQL@ModernSQL·
@damassima For the avoidance of misunderstandings: PostgreSQL *can* use expressions in ORDER BY, but they must not contain the names of columns from the SELECT clause.
English
1
0
0
117
Daisuke Matsushima
Daisuke Matsushima@damassima·
@ModernSQL thanks for the clarification! I had misunderstood that detail. Appreciate the correction.
English
0
0
1
20
Compartilhar