본문 바로가기

카테고리 없음

[mysql] Table create

반응형
-- Table user
CREATE TABLE user (
id int NOT NULL AUTO_INCREMENT,
email varchar(50) UNIQUE,
birthday date NOT NULL,
gender char(1) DEFAULT 'M',
lat double DEFAULT 37.564174,
lng double DEFAULT 126.997576,
update_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT User_pk PRIMARY KEY (id)
);


반응형