2016-02-16 56 views

回答

0

在SQL Plus中,您可以這樣做:

select * from &table; 

SQL Plus會提示您輸入表名。

在PL/SQL程序,你會使用動態SQL:

declare 
    rc sys_refcursor; 
    l_table varchar2(30) := 'EMP'; 
begin 
    open rc for 'select * from ' || l_table; 
end; 

的樂趣,然後開始從光標獲取數據...

+0

它也適用於pl/sql中的&table。謝謝!!! – NG83