|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi! I'm new in firebird and I need your help.
I put a check constraint to control de values that a field can have and at the same time I said that that field has to be NOT NULL and I put 0 (zero) by default. What I wonder is that, if in the check constraind e say: number like '[0-9][0-9][0-9]', it will alow me to put that default or I have to define to default something like 000? Thank you very much! Dani |
|
#2
|
||||
|
||||
|
Shouldn't you say that the number has to be between 0 and 999?
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
Quote:
No for exemple, here in portugal our phone number has nine digits starting with 2, so i say check phone like '2[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'. What I want to know is if he accept by default 0 or if i have tu put a number with nine digits by default like 000000000. Thank you very much! Dani |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Check Constraints |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|