Table of Contents



pears.ContactDepartment

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

List of Departments offered for Client Contacts (NOT linked to IQX Department records)

Columns

Column Type Null Default Comment
ContactDepartmentID char(20) NOT NULL
Name char(50) NOT NULL
DepartmentID char(2) NULL
SortOrder smallint NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
department DepartmentID pears.Department (departmentid) ON DELETE CASCADE

Referenced By

Indexes

Name Type Columns Detail
ContactDepartment_sortorder Index DepartmentID, SortOrder, Name

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ContactDepartment"
-- Table comment: List of Departments offered for Client Contacts (NOT linked to IQX Department records)
-- Statement count: 4
 
CREATE TABLE "pears"."ContactDepartment" (
    "ContactDepartmentID"            CHAR(20) NOT NULL
   ,"Name"                           CHAR(50) NOT NULL
   ,"DepartmentID"                   CHAR(2) NULL
   ,"SortOrder"                      SMALLINT NULL
   ,PRIMARY KEY ("ContactDepartmentID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ContactDepartment" IS 
	'List of Departments offered for Client Contacts (NOT linked to IQX Department records)'
GO
 
 
ALTER TABLE "pears"."ContactDepartment"
    ADD FOREIGN KEY "department" ("DepartmentID" ASC)
    REFERENCES "pears"."Department" ("departmentid")
    ON DELETE CASCADE
GO
 
 
CREATE INDEX "ContactDepartment_sortorder" ON "pears"."ContactDepartment"
    ( "DepartmentID","SortOrder","Name" )
GO