Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 14th, 2006, 10:10 AM
danimaia danimaia is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 danimaia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 10 m 19 sec
Reputation Power: 0
Exclamation Check Constraints

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

Reply With Quote
  #2  
Old March 14th, 2006, 11:31 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,815 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 1 Day 14 m 37 sec
Reputation Power: 278
Shouldn't you say that the number has to be between 0 and 999?

Reply With Quote
  #3  
Old March 14th, 2006, 12:05 PM
danimaia danimaia is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 4 danimaia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 10 m 19 sec
Reputation Power: 0
Quote:
Originally Posted by pabloj
Shouldn't you say that the number has to be between 0 and 999?


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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Check Constraints


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway