3 ms·
_SELECT 1 means "select the first column"_ In SQL Server at least, no, it literally means select the integer 1. In the ORDER BY clause, it does mean to order b
by nice-try-fletch 3y ago
_SELECT 1 means "select the first column"_
In SQL Server at least, no, it literally means select the integer 1. In the ORDER BY clause, it does mean to order by ordinal position, but that's not a great thing to glorify, since ordinal position is not necessarily stable. I think other dialects like MySQL might allow GROUP BY 1, but that's not a great thing to glorify either.