讀取oracle long型別及判斷是否自動分割槽表

zhouwf0726發表於2019-02-23
CREATE or REPLACE function Find_Value
    ( av_owner varchar2, av_tname varchar2, av_pname varchar2)
RETURN varchar2
IS
  long_var LONG;
BEGIN
    SELECT HIGH_VALUE INTO long_var
    FROM DBA_TAB_PARTITIONS
    WHERE table_owner = av_owner
    AND table_name = av_tname and partition_name = av_pname;
  return long_var;
END;
/
 
SELECT table_owner, table_name, partition_name, Find_Value(table_owner, table_name, partition_name)
FROM DBA_TAB_PARTITIONS where table_name='xxxxxx';
SELECT table_name,interval FROM DBA_PART_TABLES WHERE TABLE_NAME IN ('GAMEDETAIL','GOODS_ROLELOCK_DETAIL');

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-735052/,如需轉載,請註明出處,否則將追究法律責任。

相關文章