SQL Basic Knowledge

SQL is a language, for defining the structures that hold data so we can organize relationships in the data.and extracting knowledge from data.

Table’s Primary Key

主键.

其值能够作为表中每一行的唯一标识。即对于表内每一行,其值都是不同的。主键可以是表中一列也可以是表中多列的组合。

对于主键有以下两条限制:

  1. 对于主键包含的每一列,在表中不同行的值必须是不同的。
  2. 对于主键包含的每一列,在表中各行中,不能没有值。