📜  sql 中的约束是什么 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:20.681000             🧑  作者: Mango

代码示例2
RULES ABOUT THE COLUMNS IN TABLE
NOT NULL      # Ensures a column cannot have a NULL value
UNIQUE          # Ensures all values in a column are unique
PRIMARY KEY  # Identifies a record in a table, is NOT NULL & UNIQUE
FOREIGN KEY  # References a unique record from another table
CHECK         # Ensures all column values satisfy a condition
DEFAULT         # Set a default value for a column if none is entered
INDEX         # Quick way of retrieving records from database