Difference between revisions of "SYSCOLUMNCONSTRAINTS"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision: SQL) |
Yvonne.milne (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Description of the constraints for a table’s columns | Description of the constraints for a table’s columns | ||
− | |||
==See Also== | ==See Also== | ||
− | [[SQL Data Types|DATA TYPES]], [[SQL SELECT|SELECT]], [[SQL System Tables|SYSTEM TABLES]] | + | [[SQL Constraints|CONSTRAINTS]], [[SQL Data Types|DATA TYPES]], [[SQL SELECT|SELECT]], [[SQL System Tables|SYSTEM TABLES]] |
− | + | ||
==Description== | ==Description== | ||
System Tables are system defined read-only tables. You can query these tables using the SELECT statement. | System Tables are system defined read-only tables. You can query these tables using the SELECT statement. | ||
− | + | {| class="wikitable" width="100%" | |
− | {| class="wikitable" | + | |
!Column||Data Type||Width||Description | !Column||Data Type||Width||Description | ||
|- | |- | ||
Line 27: | Line 24: | ||
|- | |- | ||
|} | |} | ||
− | |||
Constraint names: | Constraint names: | ||
Line 45: | Line 41: | ||
* RECALCULATE | * RECALCULATE | ||
* WHEN | * WHEN | ||
− | |||
==Example== | ==Example== | ||
Line 54: | Line 49: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
[[Category:System Tables]] | [[Category:System Tables]] |
Latest revision as of 11:05, 11 February 2013
Contents
Purpose
Description of the constraints for a table’s columns
See Also
CONSTRAINTS, DATA TYPES, SELECT, SYSTEM TABLES
Description
System Tables are system defined read-only tables. You can query these tables using the SELECT statement.
Column | Data Type | Width | Description |
---|---|---|---|
TABLE_CAT | C | 30 | Table catalog |
TABLE_SCHEM | C | 30 | Table schema |
TABLE_NAME | C | 30 | Table name |
COLUMN_NAME | C | 32 | Column name |
CONSTRAINT_NAME | C | 30 | Constraint Name (see below) |
CONSTRAINT | C | 100 | Constraint |
Constraint names:
- AUTOINC NEXT
- AUTOINC STEP
- CALCULATED
- CHECK
- CHOICES
- DEFAULT
- ERROR
- HELP
- NOT NULL
- NULL SUPPORT
- PICTURE
- RANGE
- RECALCULATE
- WHEN
Example
SELECT column_name; FROM syscolumnconstraints; WHERE table_name = 'example'