How to use the 'as' keyword to alias a table in Oracle?

大兔子大兔子 提交于 2019-11-26 10:47:18

You can use AS for table aliasing on many SQL servers (at least MsSQL, MySQL, PostrgreSQL) but it's always optional and on Oracle it's illegal.

So remove the AS :

SELECT G.Guest_ID, G.First_Name, G.Last_Name
FROM Guest G
Kokila Mohan

Omit the AS for table alias in Oracle.

SELECT G.Guest_ID, G.First_Name, G.Last_Name
FROM Guest G
  JOIN Stay S ON G.Guest_ID = S.Guest_ID
WHERE G.City = 'Miami' AND S.Room = '222';

This will give you the output without errors.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!