[데이터베이스] 74. 데이터 조작 (DML)

서회정's avatar
Feb 27, 2025
[데이터베이스] 74. 데이터 조작 (DML)
📌
  1. 데이터 삽입 (Insert)
  1. 데이터 갱신 (Update)
  1. 데이터 삭제 (Delete)
  1. 데이터 조회 (Select)
 

1. 데이터 삽입

-- DML (데이터 조작어) -- 1. INSERT select * from bonus; desc bonus; insert into bonus(ename, job, sal, comm) values('홍길동','프로그래머', 600, 100); insert into bonus(ename, job, sal, comm) values('임꺽정','변호사', 1000, 200);
notion image
notion image
notion image
 

2. 데이터 갱신

-- 2. UPDATE update bonus set sal = 2000, comm = 500 where job = '프로그래머'; select * from bonus;
notion image
 
-- job이 변호사인 친구의 이름을 임하룡으로 변경하시오. update bonus set ename = '임하룡' where job = '변호사'; select * from bonus;
notion image
 

3. 데이터 삭제

-- 3. DELETE delete from bonus where job = '프로그래머'; select * from bonus;
notion image
Share article

clubnerdy