Re: Rule or check

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 01/10/05


Date: Mon, 10 Jan 2005 13:38:15 -0600


>> the price must be like this price=>cust + (cust * 0,5)

Seems like a derived column ( computed column ) should do:

CREATE TABLE t (
    cust INT NOT NULL PRIMARY KEY,
    incr DECIMAL ( 5, 2 ) INT NOT NULL,
    price AS cust * 1.5 ) ;

-- 
Anith 


Relevant Pages

  • Re: VAT rate or VAT amount as a column?
    ... Emily Jones wrote: ... I thought a table with a derived column in it ISN'T normalised. ... Functionaly dependent not on the Primary Key, ...
    (comp.databases.theory)
  • Re: VAT rate or VAT amount as a column?
    ... I thought a table with a derived column in it ISN'T normalised. ... Functionaly dependent not on the Primary Key, ... (if you go triggers) ... Kenneth Downs ...
    (comp.databases.theory)