How can I give an alias to a table in Oracle?

后端 未结 1 563
野的像风
野的像风 2020-12-07 05:49

Why can\'t I give an alias to a table in Oracle DB? I tried to write a statement like this one:

select count(id) from users as usr where usr.dept = \"SVC\";
         


        
1条回答
  •  無奈伤痛
    2020-12-07 06:01

    Oracle doesn't allow as for table aliases, only column aliases. So do:

    select count(id)
    from users usr
    where usr.dept = 'SVC';
    

    0 讨论(0)
提交回复
热议问题