ORACLE中约束的查看以及分类

直接上代码

select constraint_name,constraint_type,search_condition
 from user_constraints
 where table_name = 'EMPLOYEES'

上图

其中constraint_name  是用户自定义的约束名,_NN代表NOT NULL

constraint_type  中C对应CHECK,P->primary key,r->FOREIGN KEY ,U-->UNIQUE

猜你喜欢

转载自blog.csdn.net/ok3356/article/details/81080349