Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为 oracle 中的序列创建同义词并currval从中获取。
currval
我使用这个语句创建了一个同义词。
CREATE SYNONYM NUMGEN FOR MY_SEQ;
当我从中获取currvalor时生成错误,同义词不存在。extvalNUMGEN
extval
NUMGEN
SELECT NUMGEN.currval FROM dual;
谁能帮我currval从同义词中获取。
您可能没有向用户授予权限。尝试使用以下任一查询授予特权并尝试。
GRANT SELECT ANY SEQUENCE to NEWDB;
GRANT SELECT ON ORIGINALDB.SEQUENCENAME TO NEWDB;
和一个