|| 连接运算符

||

--批量修改sequence:
 select 'alter sequence ' || SEQUENCE_OWNER ||'.'||sequence_name|| ' cache 1000;' from dba_sequences;

---批量drop 表:
SQL> select 'drop table '||table_name||';' from user_tables;

---计算所有表中的行数:
 select 'select count(*) from '||table_name||';' from user_tables;


---批量kill 持有行锁进程
select 'alter system kill session '||''''||SID||','||SERIAL#||''''||';' from v$session where sid in (select sid from v$lock where type in ('TM','TX') and lmode=6)

原文地址:https://www.cnblogs.com/zhaoyangjian724/p/3797909.html