SQL
should be lowercase, sql
, and you don't need to repeat the language name on the END_SRC
line:
#+BEGIN_SRC sql
SELECT *
FROM Production.Product
ORDER BY Name ASC;
#+END_SRC
org-mode just appends -mode
to the language name given and tries to find a major mode function. Emacs Lisp function names are case sensitive, so sql-mode
exists while SQL-mode
doesn't.
You can get a list of all such functions by typing C-h a -mode$
, i.e. search for all functions that end with -mode
, but the resulting list contains many modes that are not major modes for programming languages.