If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Limit the maximum value in a number field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-30-11, 07:45
melgra70 melgra70 is offline
Registered User
 
Join Date: Mar 2011
Location: Sydney, Australia
Posts: 58
Limit the maximum value in a number field

When setting up the properties of a field, what is the expression for limiting the numbers which can be entered to <=9?
The number entered in this field must be 9 or less but not null.
Reply With Quote
  #2 (permalink)  
Old 04-30-11, 10:18
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
This is not possible with MySQL as it does not support check constraints.

The only workaround is to use a trigger.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On