April 2002
Intermediate to advanced
416 pages
11h 50m
English
The following sections describe SQL Server stored procedures that describe relationships between tables.
The sp_pkeys stored procedure gives information about a table’s primary key. The following text shows the output of the SQL statement sp_pkeys CustomerOrders. The PK_NAME column is truncated to fit on the page.
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME COLUMN_NAME KEY_SEQ PK_NAME =============== =========== ============== =========== ======= ================== OrderEntry dbo CustomerOrders OrderId 1 PK__CustomerOrd...
This output indicates that the CustomerOrders table’s primary key is the single field OrderId. The key’s full name is PK__CustomerOrders__027D5126.
The sp_fkeys stored procedure ...
Read now
Unlock full access