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 > Not Null

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-04, 10:27
padraig padraig is offline
Registered User
 
Join Date: Oct 2002
Location: Maine
Posts: 41
Question Not Null

I have tried searching the forums here, but that function seems to be broken. Hasn't worked for a few weeks now. So if this is a redundant post...Sorry.

I am new to MySQL and have created a database with a MS Access front end. Everything works great, but I want to limit users from adding incomplete records. I thought the "Not Null" setting would not allow users to add records with Null values for the fields I specified, but they get added anyway. Does anyone know how to do this? I''ve got more experience with Access and wish the "Required" setting in Access existed in MySQL, but it doesn't.

Any ideas would be appreciated. Thanks in advance!

Pat
Reply With Quote
  #2 (permalink)  
Old 12-23-04, 22:10
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
NOT NULL means the column may not have a NULL value

so NOT NULL is what you want, it prevents an incomplete row from being inserted if any of the NOT NULL columns does not have a value assigned for the new row

you could designate a DEFAULT value for all the columns that the users might potentially omit

what results do you get when you run this query:
Code:
SHOW FIELDS FROM yourtable
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
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