====== pears.TempPriceList ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Headers for available Price Lists. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **TempPriceListID** | char(20) | NOT NULL | | | | Description | char(50) | NOT NULL | | | | PriceListCode | char(20) | NULL | | | | DepartmentID | char(2) | NULL | | | | SortOrder | smallint | NULL | | | ===== Primary Key ===== * TempPriceListID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | department | DepartmentID | [[database:tables:pears_department|pears.Department (departmentid)]] | ON DELETE SET NULL | ===== Referenced By ===== ^ Table ^ Constraint ^ Columns ^ Referenced columns ^ | [[database:tables:pears_vacancy|pears.vacancy]] | TempPriceList | PriceListID | TempPriceListID | ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | TempPriceList_Code | Index | PriceListCode, Description | | | TempPriceList_DeptCode | Unique index | DepartmentID, PriceListCode | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."TempPriceList" -- Table comment: Headers for available Price Lists. -- Statement count: 5 CREATE TABLE "pears"."TempPriceList" ( "TempPriceListID" char(20) NOT NULL ,"Description" char(50) NOT NULL ,"PriceListCode" char(20) NULL ,"DepartmentID" char(2) NULL ,"SortOrder" smallint NULL ,PRIMARY KEY ("TempPriceListID" ASC) ) go COMMENT ON TABLE "pears"."TempPriceList" IS 'Headers for available Price Lists.' go ALTER TABLE "pears"."TempPriceList" ADD FOREIGN KEY "department" ("DepartmentID" ASC) REFERENCES "pears"."Department" ("departmentid") ON DELETE SET NULL go CREATE INDEX "TempPriceList_Code" ON "pears"."TempPriceList" ( "PriceListCode","Description" ) go CREATE UNIQUE INDEX "TempPriceList_DeptCode" ON "pears"."TempPriceList" ( "DepartmentID","PriceListCode" ) go