/*drop table testtable;drop table testcode;*/create table testtable(id integer not null primary key,zt varchar2(10) null);insert into testtable values(1,'abc');insert into testtable values(2,'ab');insert into testtable values(3,'a');insert into testtable values(4,'c');insert into testtable values(5,'bc');/create table testcode(zt varchar2(10) not null primary key,dmlb varchar(100));insert into testcode values('a','字符串a');insert into testcode values('b','字符串b');insert into testcode values('c','字符串c');/create or replace function testtranslate(acode in varchar2) return varchar2 is result varchar2(500); i integer; c varchar2(1); v varchar2(100);begin result := ''; for i in 1 .. length(acode) loop c := substr(acode, i, 1); select dmlb into v from testcode where zt = c; result := result || v || ','; end loop; if length(result) > 0 then result := substr(result, 1, length(result) - 1); end if; return(result);end testtranslate;/select id,testtranslate(zt) from testtable;
mybatis oracle 建表语句吗,mybatis里的xml中的写添加的sql语句,怎么使用oracle数据库的序列...
最新推荐文章于 2023-02-14 08:15:51 发布