SQL> conn system/manager
已连接。
SQL> select * from emp where rownum=1;
select * from emp where rownum=1
*
ERROR 位于第 1 行:
ORA-00942: 表或视图不存在
SQL> select * from scott.emp where rownum=1; EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- ---------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-12月-80 800
20
SQL> conn scott/tiger
已连接。
SQL> select * from emp where rownum=1; EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- ---------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-12月-80 800
20
SQL>
已连接。
SQL> select * from emp where rownum=1;
select * from emp where rownum=1
*
ERROR 位于第 1 行:
ORA-00942: 表或视图不存在
SQL> select * from scott.emp where rownum=1; EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- ---------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-12月-80 800
20
SQL> conn scott/tiger
已连接。
SQL> select * from emp where rownum=1; EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- ---------- ---------- ----------
DEPTNO
----------
7369 SMITH CLERK 7902 17-12月-80 800
20
SQL>
create synonym your_synonym_name as schema.table,
不需要限定词的。同义词也是对象,不过上面的语法对不对,我忘咯。经常不用的语句。