- 论坛徽章:
- 0
|
SQL> CONNECT INFORMIX/INFORMIX
Connected.
SQL> create table maction
(
actid varchar(20),
typeid smallint NOT NULL ,
des_cont varchar(20),
remark varchar(10),
constraint pk_maction primary key (actid)
)
;
Table created.
SQL> SELECT OWNER,CONSTRAINT_NAME FROM USER_CONSTRAINTS ;
OWNER CONSTRAINT_NAME
------------------------------ ------------------------------
INFORMIX SYS_C006103
INFORMIX PK_MACTION
SQL> SELECT DBMS_METADATA.get_ddl('CONSTRAINT',T.constraint_name)
FROM USER_CONSTRAINTS T;
ERROR:
ORA-31603: object "SYS_C006103" of type CONSTRAINT not found in schema
"INFORMIX"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
ORA-06512: at "SYS.DBMS_METADATA", line 628
ORA-06512: at "SYS.DBMS_METADATA", line 1221
ORA-06512: at line 1
no rows selected
SQL>
显然SYS_C006103是建立在列 typeid 上的非空约束,且所有者就是informix,为什么使用DBMS_METADATA.get_ddl时却说它不属于informix呢? |
|