Primary key in the database

Source: Internet
Author: User

Primary key: A table often has a combination of columns or columns whose values uniquely identify each row in the table. Such a column or columns is called the table's primary key, which enforces the entity integrity of the table. When you create or change a table, you can create a primary key by defining the PRIMARY key constraint. A table can have only one PRIMARY key constraint, and a column in the PRIMARY key constraint cannot accept null values. Because the PRIMARY KEY constraint ensures unique data, it is often used to define identity columns. Role: 1) Ensure the integrity of the entity; 2) speed up the operation of the database 3) when you add a new record to a table, Access automatically checks the primary key value of the new record and does not allow the value to repeat with the primary key values of other records. 4) Access automatically displays the records in the table in the order of the primary key values. If no primary key is defined, records in the table are displayed in the order in which they are entered.

Primary key in the database

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.