News for hackers. Stuff that matters.
Re:Shouldn't FROM come before SELECT in SQL? (2011) by WorldMaker on Thursday January 25, 2024 @10:57AM (#39130898)
Given how often `SELECT ` is already the developer "default" especially in debugging and REPL work there's a good case that `SELECT ` can truly just be the implied default case and something like `FROM 1` makes perfect sense as a standalone statement.
Re:Shouldn't FROM come before SELECT in SQL? (2011) by jacques_chester on Thursday January 25, 2024 @11:54AM (#39131684)
Even neater.

DuckDB has an implicit "SELECT *" if you just give it "FROM tablename", which fits your example.

Re:Shouldn't FROM come before SELECT in SQL? (2011) by chrisjc on Thursday January 25, 2024 @12:17PM (#39131982)
But interestingly DuckDB doesn't support `SELECT 'FOO' AS BAR FROM DUAL;` or `SELECT 'FOO' AS BAR FROM 1;`.

Which I guess makes sense if it has an implicit `SELECT *`.

What would the implicit projection of `FROM DUAL;` be?

Re:Shouldn't FROM come before SELECT in SQL? (2011) by WorldMaker on Thursday January 25, 2024 @02:35PM (#39134049)
From my experience of Oracle `FROM DUAL;` projection would give you on a coin flip either an empty table or a stacktrace error from some Java library.