有两个表:申请人,适用
//APPLICANT
A#
-------------
1
2
3
4
5
//APPLIES
A# POSITION
---------------------
1 GM
2 CEO
3 DIRECTOR
3 MANAGER
所以我创建这样的用户:
CREATE USER TEST IDENTIFIED BY TESTING;
GRANT CREATE SESSION TO TEST;
现在我希望在APPLICANT表上使用select选择TEST,它在APPLIES表中使用跟随查询至少有1条记录:
SELECT a.A#,COUNT(a.A#) FROM APPLICANT a
INNER JOIN APPLIES ap ON a.A#=ap.A#
HAVING COUNT(a.A#)>0 GROUP BY a.A#;
我如何授予用户TEST?使用select子句条件
GRANT SELECT ON APPLICANT WHERE (SELECT.......) TO TEST;
无法正常工作,错误就出来了。