Thread: How to define fixed validation tables
My planned database has a field with a rather small list of valid codes. I want to include validation in processing inputs, probably with a CHECK rolecode IN ...something.... The validation table is not intended to be alterable by the user. As a table it is as simple as (code: CHAR(2), meaning TEXT); The values should be fixed as part of the definition process. Please, How-To? -- David A Cobb, computing dinosaur (Cobol-o-saurus Rex) -- "I am, by God's grace, a Christian man; by my actions a great sinner" -- Way of a Pilgrim, anon. Russian, R.M.French, tr.
On Thursday, December 28, 2017, David A. Cobb <david.a.cobb.1943@gmail.com> wrote:
The values should be fixed as part of the definition process.
You can make it difficult to alter the table contents but not impossible - and I'd lean toward a table rather than a check constraint.
Grants and triggers are your most direct tools of choice here.
David J.