SQL statement

xiaoxiao2021-03-05  24

--Identity (1001, 1): Automatic increment, starting number 1001, increasing number 1; Primary Key: Primary key, does not have a repetition Create Table Test (ID Int Id Id Identity (1001, 1) Primary Key - foreign key constraint. Tab2 ID corresponds to Tab1 ID, you cannot add IDCREATE TAB1 Tab1 in Tab2 (ID Int IDETENTITY (Int Int Int KEY (ID) Reference Tab1 (ID)) - Non-empty constraints Carete Table Test (Name Varchar (10) Not Null - Check constraints. Field AGE input must be greater than 6, field SEX must enter M or Fcreate Table Test (ID Int Id IDENTITY (1000, 1) Primary Key, AGE INT Check (AGE> 6) SEX VARCHAR (30) Check (SEX IN ('M', 'F'))) - Default constraint. Field SEX defaults is McReate Table Test (ID Int Id IDENTITY Primary Key, SEX VARCHAR (30) Default 'M')

转载请注明原文地址:https://www.9cbs.com/read-37683.html

New Post(0)