728x90
반응형
UPDATE

 

- 테이블에 기존 값을 새로운 값으로 변경

UPDATE Table
SET Col1 = Val1, [, Col2 = Val2, Col3 = Val3, ...]
[WHERE 조건식];

 

UPDATE countries
SET country_name = 'Democratic People''s Republic of Korea'
-- Single Quotation mark ''
WHERE country_id = 'KP';

UPDATE countries
SET country_name = 'Republic of Korea'
WHERE country_id = 'KR';
UPDATE departments
SET department_name = 'IT Testing'
WHERE department_id = 280;
UPDATE departments
SET department_name = 'IT Quality Assuarance'
WHERE department_id = 280;
UPDATE jobs
SET job_id = 'IT QA', job_title = 'Quality Assuarance'
WHERE job_id = 'IT DS';
728x90
반응형

'Language > RDBMS' 카테고리의 다른 글

데이터 무결성과 제약 조건  (0) 2023.03.03
[DML-DELETE] 데이터 삭제  (0) 2023.03.03
[DML_INSERT] 데이터 삽입  (0) 2023.03.03
[DML_SELECT] 서브 쿼리  (0) 2023.03.03
[DML_SELECT] JOIN 연산  (0) 2023.03.03

+ Recent posts