Oracle获取指定表相关的sql

 select c.kglnaobj sql_text

  from sys.x$kglob o, sys.x$kgldp d, sys.x$kglcursor c
 where o.inst_id = userenv('Instance')
   and d.inst_id = userenv('Instance')
   and c.inst_id = userenv('Instance')
   and o.kglnaown = upper('LOG')
   and o.kglnaobj = upper('T1')
   and d.kglrfhdl = o.kglhdadr
   and c.kglhdadr = d.kglhdadr
 group by c.kglnaobj
 

你可能感兴趣的:(oracle,sql,表)