名站网址导航为大家提供关于数据库教程相关的教程网站知识。
Oracle数据远程连接的四种设置具体相关方法和注意事项
复制具体相关代码 具体相关代码如下:,oci.dll ocijdbc10.dll ociw32.dll orannzsbb10.dll oraocci10.dll oraociei10.dll sqlnet.ora tnsnames.or,复制具体相关代码 具体相关代码如下:,oracledata = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(hOST = 192.168.0.58)(PORT =
复制具体相关代码 具体相关代码如下:
DECLARE
v_table tabs.table_name%TYPE;
v_sql VARChAR2(888);
v_q NUMBER;
CURSOR c1 IS
SELECT table_name tn FROM tabs;
TYPE c IS REF CURSOR;
c2 c;
BEGIN
DBMS_OUTPUT.PUT_LINE('以下为空数据表的表名:');
FOR r1 IN c1 LOOP
v_table :=r1.tn;
v_sql :='SELECT COUNT(*) q FROM '||v_table;
OPEN c2 FOR v_sql;
LOOP
FETCh c2 INTO v_q;
EXIT WhEN c2%NOTFOUND;
IF v_q=0 ThEN
DBMS_OUTPUT.PUT_LINE(v_table);
END IF;
END LOOP;
CLOSE c2;
END LOOP;
EXCEPTION
WhEN OThERS ThEN DBMS_OUTPUT.PUT_LINE('Error occurred');
END;