****************************************************************
一、多個條件模糊查詢
select * from mgs_parameters
where lookup_type='PRODUCT_IP_RELATION_INFO' and REGEXP_LIKE(description, '^(string|串焊)')
*******************************
select * from student order by to_number(studentid)
二 、如果鎖表 解決方案
--找出是哪個會話鎖住了哪張表
--session_id 爲會話 ID。 object_name 表名。
select l.session_id,o.owner,o.object_name
from v$locked_object l,dba_objects o
where l.object_id=o.object_id;
--找出引發鎖的會話
--其中的 serial# 是我們需要用到的會話序列號。
select s.username,s.sid,s.serial#,s.logon_time
from v$locked_object l,v$session s
where l.session_id=s.sid
order by s.logon_time;
--殺掉會話
alter system kill session '145,2522';
三 、查看是哪個sql引起的
select b.username,b.sid,b.serial#,c.*
from v$locked_object a,v$session b,v$sql c where a.session_id = b.sid
and b.SQL_ID = c.sql_id and c.sql_id = '19'
order by b.logon_time;