0

我正在使用oracle 11g r2. 当我运行以下查询时:

select 
  u.object_name,
  u.object_type,
  t.owner,
  DBMS_METADATA.GET_DDL(u.object_type, u.object_name) "DLL_INFORMATION"
from user_objects u
inner join all_tables t
on u.object_name = t.table_name

ddl信息栏的结果是:

oracle.sql.CLOB@60802850

当我需要看到这些

CREATE TABLE "SYS"."ICOL$" 
 (  
   "OBJ#" NUMBER NOT NULL ENABLE, 
   "BO#" NUMBER NOT NULL ENABLE, 
   "COL#" NUMBER NOT NULL ENABLE, 
   "POS#" NUMBER NOT NULL ENABLE, 
   "SEGCOL#" NUMBER NOT NULL ENABLE, 
   "SEGCOLLENGTH" NUMBER NOT NULL ENABLE, 
   "OFFSET" NUMBER NOT NULL ENABLE, 
   "INTCOL#" NUMBER NOT NULL ENABLE, 
   "SPARE1" NUMBER, 
   "SPARE2" NUMBER, 
   "SPARE3" NUMBER, 
   "SPARE4" VARCHAR2(1000), 
   "SPARE5" VARCHAR2(1000), 
   "SPARE6" DATE
 ) CLUSTER "SYS"."C_OBJ#" ("BO#")

如何设置列的缓冲区或在列上进行强制转换???

4

1 回答 1

0

我找到了答案:DBMS_LOB.SUBSTR(DBMS_METADATA.GET_DDL(u.object_type, u.object_name), 2000,1) as "DLL_INFORMATION"。谢谢,顺便说一句

于 2013-11-25T07:04:49.960 回答