Table of Contents



pears.IQacCountry

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

Description

Countries used in sales ledger.

Columns

Column Type Null Default Comment
CountryCode char(3) NOT NULL
DefaultCurrencyCode char(3) NOT NULL
Name char(50) NOT NULL
EUFlag smallint NOT NULL 0 1 if member of EU

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
IQacCurrency DefaultCurrencyCode pears.IQacCurrency (CurrencyCode) NOT NULL;

Referenced By

Table Constraint Columns Referenced columns
pears.IQacParams IQacCountry CountryCode CountryCode

Indexes

Name Type Columns Detail
IQacCtry_Name Unique index Name

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQacCountry"
-- Table comment: Countries used in sales ledger.
-- Statement count: 5
 
CREATE TABLE "pears"."IQacCountry" (
    "CountryCode"                    CHAR(3) NOT NULL
   ,"DefaultCurrencyCode"            CHAR(3) NOT NULL
   ,"Name"                           CHAR(50) NOT NULL
   ,"EUFlag"                         SMALLINT NOT NULL DEFAULT 0
   ,PRIMARY KEY ("CountryCode" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."IQacCountry"."EUFlag" IS 
	'1 if member of EU'
GO
 
 
COMMENT ON TABLE "pears"."IQacCountry" IS 
	'Countries used in sales ledger.'
GO
 
 
ALTER TABLE "pears"."IQacCountry"
    ADD NOT NULL FOREIGN KEY "IQacCurrency" ("DefaultCurrencyCode" ASC)
    REFERENCES "pears"."IQacCurrency" ("CurrencyCode")
GO
 
 
CREATE UNIQUE INDEX "IQacCtry_Name" ON "pears"."IQacCountry"
    ( "Name" )
GO