| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: SQL Humor
AK wrote:
> >>
> >>> In fact, those ugly length
> >limited datatypes are just artifacts of the early SQL days,
> ><<
>
> >on the contrary, it is a very powerful tool in enforsing data integrity
>
>
>
> Oh? How?
> <<
>
> by declaring STATE_CODE CHAR(2) I don't let old style abbreviations
> 'Fla' and 'Ill' in
>
> by declaring COUNTRY_CODE CHAR(3), etc.
Why not
CHECK CONSTRAINT(LENGTH(COUNTRY_CODE)<=2)
BTW, this way you could also declare that COUNTRY_CODE has exactly 2 characters. Received on Fri Aug 19 2005 - 17:11:14 CDT
![]() |
![]() |