Acción Comando
Constraints: visualizar
SELECT * FROM information_schema.table_constraints tc

inner JOIN information_schema.key_column_usage kcu
ON tc.constraint_catalog = kcu.constraint_catalog
AND tc.constraint_schema = kcu.constraint_schema
AND tc.constraint_name = kcu.constraint_name
AND tc.table_name = kcu.table_name

LEFT JOIN information_schema.referential_constraints rc
ON tc.constraint_catalog = rc.constraint_catalog
AND tc.constraint_schema = rc.constraint_schema
AND tc.constraint_name = rc.constraint_name
AND tc.table_name = rc.table_name

WHERE tc.constraint_schema = 'bdatos'
                        
Constraints: foreing keys - añadir
    ALTER TABLE tabla 
    ADD CONSTRAINT nombreConstraint
    FOREING KEY (idTabla)
    REFERENCES tabla(ID)
    ON DELETE CASCADE