Can we use AS
to create an ALIAS in FROM
.If no,why? .If yes,is it limited to only few cases?(because I am getting an error in my case)
ALIAS in FROM
without AS
works perfectly fine
SELECT a.id_employee FROM(SELECT id_employee FROM table1 union SELECT id_employee FROM table2) a;
But why ALIAS in FROM
using AS
creates error 00933. 00000 - "SQL command not properly ended"
SELECT a.id_employee FROM(SELECT id_employee FROM table1 union SELECT id_employee FROM table2) as a;
NOTE: Also I came across the oracle: can you assign an alias to the from clause? explanations which used AS
. So can ?