output '\t' in dbms_output package!
use oracle character function to replace the '\t' and other special characters!
declare
t1 integer;
t2 integer;
stmt varchar2(2048);
begin
for t in (select tname from tab) loop
stmt := 'select count(*) from ' || t.tname;
execute immediate stmt into t1;
stmt := 'select count(*) from system.' || t.tname;
execute immediate stmt into t2;
if t1 != t2 then
stmt := chr(9) || 'different! ';
else
stmt := chr(9) || ' ';
end if;
dbms_output.put_line(rpad(t.tname, 34, ' ')
|| chr(9) || to_char(t1) || chr(9) || to_char(t2)
|| stmt);
end loop;
end;
|
阅读(2758) | 评论(0) | 转发(0) |