SQL Online Compiler - for Data Science
CREATE TABLE all_about_stevy( -- 소문자로 쓰자 대문자 쓰면 더블 쿼터 "" 써줘야한다
pesonality_id INT PRIMARY KEY -- 유니크 + Nullable 아님
,pesonality_name VARCHAR(50) NOT null
,ability_id INT NULL -- 능력을 번호로 지정해주자
,create_at TIMESTAMP(0) NOT null DEFAULT CURRENT_TIMESTAMP -- now()
)
CREATE TABLE ability (
ability_id INT
,ability_name VARCHAR(50) NOT null
,create_at TIMESTAMP(0) NOT null DEFAULT CURRENT_TIMESTAMP
)
INSERT INTO ability VALUES(1, 'javascript')
INSERT INTO ability VALUES(2, 'typescript')
INSERT Into ability (ability_id, ability_name) VALUES (3, 'rust')