请问大家怎么引用远程数据库中序列?

[复制链接]
查看11 | 回复5 | 2005-2-28 12:57:00 | 显示全部楼层 |阅读模式
请问大家怎么引用远程数据库中序列?
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
远程数据库中用function包装sequence.
本地调用远端的function.
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
请问在远程数据库中如何包装sequence,我是第一次写oracle 的存储过程,不好意思
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
create or replace function getseq return number is
begin
return mysequence.nextval;
end;
/
本地调用:
selectgetseq@remotedblink from dual;
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
楼上的大哥阿,你这个函数根本编译不过去
回复

使用道具 举报

千问 | 2005-2-28 12:57:00 | 显示全部楼层
我把你的方法稍微改了一下
create or replace function GET_INTER_TRACE_SEQ return number as
temp number;
begin
select INTER_TRACE_SEQ.NEXTVAL into temp from dual;
return temp;
end;
/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行