Use the information_schema.table_constraints
table to get the names of the constraints defined on each table:
select *
from information_schema.table_constraints
where constraint_schema = 'YOUR_DB'
Use the information_schema.key_column_usage
table to get the fields in each one of those constraints:
select *
from information_schema.key_column_usage
where constraint_schema = 'YOUR_DB'
If instead you are talking about foreign key constraints, use information_schema.referential_constraints
:
select *
from information_schema.referential_constraints
where constraint_schema = 'YOUR_DB'
밑의 주소는 트리거 관리 관련 자료
http://www.mysqltutorial.org/managing-trigger-in-mysql.aspx
'develop > sql' 카테고리의 다른 글
mysql centos7 release 버전보다 낮은 버전 설치하기 (0) | 2017.07.12 |
---|---|
Oracle등의 check 제약조건 mysql에서 쓰기 (0) | 2014.09.02 |
[펌] CentOS 6.4 + Oracle 11gR2 설치 (0) | 2014.07.29 |