How to get Check constraint name with SQL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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?
 
Back
Top