728x90
이 글 이전에 포스팅한 CRUD로 실습 문제풀이를 하는 과정입니다.
1.
2.
select article,color
from shirts;
3.
select article,color,shirt_size,last_worn
from shirts
where shirt_size='M';
4.
update shirts
set shirt_size = 'L'
where article = 'polo shirt';
5.
update shirts
set last_worn = 0
where last_worn > 15;
6.
update shirts
set shirt_size = 'XS' , color = 'off white'
where color = 'white';
7.
delete from shirts
where last_worn > 200;
8.
delete from shirts
where article = 'tank top';
9.
delete from shirts;
10.
drop table shirts;
'MySQL' 카테고리의 다른 글
MySQL - substring() 문자열 일부분 가져오기 (0) | 2022.12.06 |
---|---|
MySQL - concat(),concat_ws(),as / 두개의 컬럼 합치기, 컬럼이름 변경해서 출력 (0) | 2022.12.06 |
MySQL - CRUD (Create, Read, Update, Delete / 데이터를 생성, 읽기, 갱신, 삭제) (0) | 2022.12.06 |
MySQL - id 컬럼 만드는 방법 (0) | 2022.12.06 |
MySQL - 여백 없애는 방법 / NULL없애는 방법 (0) | 2022.12.06 |