- 
                Notifications
    You must be signed in to change notification settings 
- Fork 689
Unique
        Mathias Rangel Wulff edited this page Jun 12, 2015 
        ·
        2 revisions
      
    AlaSQL supports UNIQUE constraints.
For example:
CREATE TABLE dbo.BOM
(
  partid     INT           NOT NULL REFERENCES dbo.Parts,
  assemblyid INT           NULL     REFERENCES dbo.Parts,
  unit       VARCHAR(3)    NOT NULL,
  qty        DECIMAL(8, 2) NOT NULL,
  UNIQUE(partid, assemblyid),
  CHECK (partid <> assemblyid)
);© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo