SQL Online Compiler - for Data Science

왜 SQL 을 알아야 될까

에러 난 상황 조회 하는 예

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e553d64e-30f7-47c9-baae-2441d86b7e29/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/24368e8f-0044-46ed-a498-53313095c72f/Untitled.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/d7e5cf8d-4a46-4f36-a72b-3f3f6d8dc887/Untitled.png

내 맘대로 실전 SQL

만들기

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')