[20230905]奇怪的語法.txt

lfree發表於2023-09-21

[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部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2985169/,如需轉載,請註明出處,否則將追究法律責任。

相關文章