SQL Insert WHERE 절

Kyle_Kim·2022년 5월 19일
0

일반적인 SQL insert

ID 1로 새 행을 삽입하려는 경우 다음을 사용해야합니다.

INSERT INTO Users(id, weight, desiredWeight) VALUES(1, 160, 145);

ID가 1 인 기존 행의 weight / desiredWeight 값을 변경하려는 경우 다음을 사용해야합니다.

UPDATE Users SET weight = 160, desiredWeight = 145 WHERE id = 1;
profile
Make Things Right

0개의 댓글