How to get Check constraint name with SQL

A

AA2e72E

CREATE TABLE MYTAB(MYCOL DECIMAL(10,2) DEFAULT 10, Check([MyCol]>10)

With this SQL, the constraint is assigned a name. How can I recover the name
with SQL?

In order to find the name, enter an incorrect value in the column.
 
A

AA2e72E

I've figured out that te ForeignName column holds the name of the Check
constraint in table MSysObjects. Any attempt to read this table give me a
error:

Record(s) cannot be read; no read permission on 'MSYSOBJECTS'

What am I missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top