Results 1 to 2 of 2

Thread: Not Null

  1. #1
    Join Date
    Oct 2002
    Provided Answers: 2

    Question Unanswered: 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!


  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    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:
    SHOW FIELDS FROM yourtable | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts