"Darren New" <dne### [at] sanrrcom> wrote in message
news:48ec5d23$1@news.povray.org...
> Gail wrote:
>> Depending how many columns are only applicable to one account type, I
>> might take a short cut and put everything in one table. It does depend
>> though.
>
> That doesn't really solve the consistency problem, tho. You could still
> wind up with an account where all the details are null, for example.
For that you could use check constraints.
ALTER TABLE Accounts ADD CONSTRAINT ck_AccountType CHECK (AccountType =
'CreditCard' AND exxpirationdate IS NOT NULL)
etc
Post a reply to this message
|