UNIQUE & CHECK constraints
Në shqip: Kufizimet UNIQUE dhe CHECK
ShpjegimiSQ
UNIQUE ndalon dy rreshta me të njëjtën vlerë (p.sh. email), CHECK kërkon që vlera të plotësojë një kusht (nota 1–10), NOT NULL ndalon vlerat bosh. Databaza i zbaton edhe kur kodi gabon.
EnglishEN
UNIQUE forbids two rows with the same value (e.g. email), CHECK requires the value to meet a condition (grade 1–10), NOT NULL forbids empty values. The database enforces them even when the code gets it wrong.
Si ta mendosh
Si rregullat e formularit që s'pranojnë dy herë të njëjtin numër personal.
Lexoje në anglisht
Like form rules that won't accept the same ID number twice.
Shembull kodisql
ALTER TABLE perdoruesit ADD CONSTRAINT email_unik UNIQUE (email);