Ask the new field when the statement ' AAA ' varchar (one) is not NULL, what is the function of NOT NULL?

Source: Internet
Author: User
What is the function of not NULL in the new field when the statement ' AAA ' varchar (one) is not null?
What is the function of not NULL in the new field when the statement ' AAA ' varchar (one) is not null?
is not null possible?
------to solve the idea----------------------
Indicates that the field cannot be empty (null), that is, when the record is inserted, the field must have a value
is not null possible? Sure, but whether it's based on your business decisions.
------to solve the idea----------------------
Not NULL is when you insert, this field cannot be null.
Remember, null and empty string are different, empty string is: ' '

Database can declare not null default ' '

In this case, inserting the data, if not declared, is stored by default as an empty string.

There are a number of reasons why not NULL, one of which is that a field in the database is NULL, which represents NULL, but for some language itself and for development reasons, you get it and it becomes a string null.
------to solve the idea----------------------
field cannot be empty when inserting data, must have value
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.