SQL AUTO INCREMENT Field
AUTO INCREMENT Field
새로운 record에 대해 unique numer를 부여하는 field
Syntax for SQL SERVER
CREATE TABLE Persons (
Personid int IDENTITY(1, 1) PRIMARY KEY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int
);
INSERT INTO Persons (FirstName, LastName)
VALUES ('Lars', 'Monsen');
'Computer Science > Database' 카테고리의 다른 글
W3Schools SQL | #53 SQL VIEWS 테이블 (0) | 2022.10.30 |
---|---|
W3Schools SQL | #52 SQL WORKING WITH DATES 날짜 이용법 (0) | 2022.10.30 |
W3Schools SQL | #50 SQL CREATE INDEX 구문 (0) | 2022.10.30 |
W3Schools SQL | #49 SQL DEFAULT CONSTRAINT 이용법 (0) | 2022.10.30 |
W3Schools SQL | #48 SQL CHECK CONSTRAINT (0) | 2022.10.30 |