- 论坛徽章:
- 0
|
第一次接触INFOMIX,请教下常用的SQL语法。请懂的朋友指教下列问题的INFOMIX的语法
1、 增加主键
ORACLE:ALTER TABLE T ADD PRIMARY KEY(COLUMN)
INFOMIX?
2、增加外键?
3、检查主键或外键是否存在
例ORACLE:select CONSTRAINT_NAME from user_constraints where table_name ='%s' and CONSTRAINT_TYPE='%s' and CONSTRAINT_NAME ='%s'
INFOMIX?
4、 给表和列添加注释
ORACLE:COMMENT ON TABLE T IS '表级注释'/ comment on column on t.c is '列级注释'
INFOMIX??
5、 查看表和列的注释
ORACLE:SELECT comments FROM USER_TAB_COMMENTS where TABLE_NAME='%s' / SELECT comments FROM USER_TAB_COMMENTS where TABLE_NAME='%s' AND COLUMN_NAME='%s'
INFOMIX?
烦请INFOMIX高手不吝指教!!! |
|