MyTetra Share
Делитесь знаниями!
скрипт обновления
Время создания: 06.11.2017 19:04
Раздел: Ariadna home - Useful scripts - Update scripts
Запись: xintrea/mytetra_db_mcold/master/base/1509984272atvwoe6luo/text.html на raw.githubusercontent.com

declare

i integer;

v_rowid rowid;

cursor cur is

select *

from countries;

begin

execute immediate 'drop table tmp';

execute immediate 'create table tmp(row1 varchar2(50))';

for rec in cur loop

if rec.test like '%тест%' then

update countries c

set c.test = 'new test'

where c.country_id = rec.country_id

returning rowid into v_rowid;

insert into tmp values(v_rowid);

end if;

end loop;

execute immediate 'commit';


exception

when others

then

NULL;

end;

Так же в этом разделе:
 
MyTetra Share v.0.59
Яндекс индекс цитирования