Unanswered: Query null/not null constraints from system tables?
I'm using ASE 12.5 on Solaris. I need to query the system tables to determine null/not null constraints for each column of various tables.
I've been able to query the other thing I need (data types of each column for various tables) from systypes, syscolumns, and sysobjects, but I can't find where the null/not null constraints are stored.
I found some encouraging info in the Sybase docs for the syscolumns table, but I'm still a bit confused.
If status = 8, then NULLs are allowed in the column. But does this automatically mean that if status != 8, then NULLs are NOT allowed? For example, if status = 16 does it mean that NULLs are allowed or not?
Table = syscolumns
Column = status
Bits 0-2 (values 1, 2, and 4) indicate bit positioning if the column uses
the bit datatype. If the column uses the text/image datatype, bits 0 and 1
indicate replication status as follows:
* 01 = always replicate
* 10 = replicate only if changed
* 00 = never replicate
Bit 3 (value 8) indicates whether NULL values are legal in this column.
Bit 4 (value 16) indicates whether more than one check constraint exists for the column.
Bits 5 and 6 are used internally.
Bit 7 (value 128) indicates an identity column.
Bit 8 is unused.