如何为Oracle中的表提供别名?

Car*_*ven 1 sql oracle table-alias

为什么我不能为Oracle DB中的表提供别名?我试着写一个像这样的声明:

select count(id) from users as usr where usr.dept = "SVC";
Run Code Online (Sandbox Code Playgroud)

但甲骨文给我一个错误.当我在MySQL中使用类似的东西时,我不记得有问题.

如何为Oracle中的表提供别名?

Gor*_*off 5

Oracle不允许as表别名,只允许列别名.所以:

select count(id)
from users usr
where usr.dept = 'SVC';
Run Code Online (Sandbox Code Playgroud)