You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mssql_Study/create table with constrain...

18 lines
444 B

USE Study
GO
CREATE TABLE customer(
id VARCHAR(20) CONSTRAINT PK_id PRIMARY KEY,
pwd VARCHAR(20) CONSTRAINT NN_pwd NOT NULL,
name VARCHAR(20) CONSTRAINT NN_name NOT NULL,
phone1 VARCHAR(3) NULL,
phone2 VARCHAR(8) NULL,
birthYear INT NULL,
address VARCHAR(100) NULL
)
INSERT INTO customer
VALUES('one', '1111', 'Kim', '010', '1234567', 1988, 'Seoul')
INSERT INTO customer
VALUES('two', '2222', 'Lee', '010', '8910111', 1978, 'Incheon')