728x90
4.1) 데이터 추가(4-16강 P.152) : INSERT INTO 테이블명 VALUES (값1,값2);
INSERT INTO FILMS VALUES ( 501,"기생충",2019,"KOREA",131,"KOREAN","15세관람가",15000000000,168163654*1190);
INSERT INTO FILMS VALUES ( 502,"Marriage Story",2019,"UK",137,"ENGLISH","15세관람가",323382,18600000);
INSERT INTO reviews VALUES ( 4969,,502,1022,295,8.0,174104,0);
4.2) DELETE (4-17강 P.160) : DELETE FROM 테이블명 WHERE 조건
DELETE FROM reviews WHERE ID =600;
4.3) UPDATE (4-18강 P.164) : UPDATE 테이블명 SET 컬럼=값 WHERE 조건
UPDATE REVIEWS SET imdb_score=8.6 WHERE film_id=501;
UPDATE REVIEWS SET num_user=40000000, num_critic=0, num_votes=62413,facebook_likes=62240 WHERE film_id=501;
728x90
'데이터엔지니어 > SQL' 카테고리의 다른 글
SQL쿼리-07조인 (0) | 2020.02.17 |
---|---|
SQL 쿼리05-집계 (0) | 2020.02.16 |
SQL 쿼리03-정렬 (0) | 2020.02.15 |
SQL 쿼리02-조회 (0) | 2020.02.15 |
데이터베이스 세팅 (0) | 2020.02.15 |