17,086
社区成员
发帖
与我相关
我的任务
分享
create table TB1
(
ID NUMBER(10) not null,
CODE NCHAR(20),
NAME VARCHAR2(100)
);
insert into TB1 (
select rownum as id, substr(col,1,10) as code, col as name from tb0 --随便找个表tb0和字段col就行
where rownum<=500
);
create or replace function format(code in varchar2)
return varchar2 deterministic
as
begin
return replace(code,'-','');
end;
/
select rownum,code,format(code) as code0 from TB1 where rownum<=300;