首页 > 数据库 > Oracle > [20230905]奇怪的语法.txt
[20230905]奇怪的语法.txt
1.环境:
SCOTT@test01p> @ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.2.0.1.0 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0
2.测试:
--//使用RELATIONAL。
SCOTT@test01p> SELECT * FROM RELATIONAL(dept);
DEPTNO DNAME LOC
---------- -------------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SCOTT@test01p> SELECT * FROM RELATIONAL(dept),emp where dept.deptno=emp.deptno and empno=7369;
DEPTNO DNAME LOC EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- -------------------- ------------- ---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
20 RESEARCH DALLAS 7369 SMITH CLERK 7902 1980-12-17 00:00:00 800 20
--//owner.table_name.column_name 可以中间插入空格,例子:
SCOTT@test01p> select dept . dname from scott . dept where rownum=1;
DNAME
--------------------
ACCOUNTING
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2985169/ ,如需转载,请注明出处,否则将追究法律责任。