Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBLINK

Tony MOraDec 1 2023

I have a procedure that uses database link but I need to use it with database link and also without database link.

Could you help me improve pl/sql?

CREATE OR REPLACE PROCEDURE PRC_DBLINK

IS

v_oder NUMBER;

SELECT dh.order INTO v_order

FROM document@dbl_history dh

WHERE rownum <= 1

dbms_output.put_line('records: ' || v_order)

end PRC_DBLINK;

Thanks a lot.

Comments
Post Details
Added on Dec 1 2023
6 comments
224 views