Oracle/SQL-Tips
[Tips]
SQL Tips
テーブルカラム名取得
select to_char(rownum, 'fm000') seq , v.* from ( select tables.table_name , comments.comments from user_tables tables inner join user_tab_comments comments on tables.TABLE_NAME = comments.TABLE_NAME inner join user_col_comments colcomments on tables.TABLE_NAME = colcomments.TABLE_NAME group by tables.table_name , comments.comments order by 1 ) v
プロセスからのSQL表示
select S.SID, P.SPID, Q.SQL_TEXT from V$SQLTEXT Q, V$SESSION S, V$PROCESS P where S.PADDR = P.ADDR and S.SQL_ADDRESS = Q.ADDRESS and P.SPID = ? --<<-- プロセスID --and S.SID IN ? -- SID order by S.SID, Q.PIECE;
Links
[Oracle]
最終更新時間:2008年04月03日 10時58分40秒