0

I have some tables on sybase-iq data base, created for example:

create  table tab
(   
   id   int  not null IQ Unique (10)
)  

How can I check if table tab was created with iq unique option?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
Robert
  • 25,425
  • 8
  • 67
  • 81

1 Answers1

1

We can do that using procedure sp_column. It returns informations about every column in the table. In a est_cardinality column is the value from IQ Unique. For example:

sp_iqcolumn tab

returns

table_name  table_owner column_name domain_name width   scale   nulls   default cardinality est_cardinality location    isPartitioned   remarks check
tab         DBA         id          integer     4       0       N               0           10               Main       N

Here is link to documentation.

Robert
  • 25,425
  • 8
  • 67
  • 81