테이블 데이터 CRUD
Create > insert into
Read > select
Update > update
Delete > delete
Delete > delete
-- 데이터 삭제
-- 고양이 나이가 7인 데이터를 삭제하시오.
delete from cats
where age = 7;
-- id가 13번째인 데이터 생성
insert into cats
(name, age)
values
('야옹이', 1);
delete from cats
where id = 13;
-- 다시 생성하면 id 13이 아닌 14로 생성된다.
insert into cats
(name, age)
values
('야옹이', 1);
'MySQL' 카테고리의 다른 글
[MySQL] 데이터를 가공 키워드 distinct, order by, limit (0) | 2024.05.14 |
---|---|
[MySQL] 문자열 컬럼 데이터 가공 함수 concat(), substring(), replace(), reverse(), char_length(), upper(), lower() (0) | 2024.05.13 |
[MySQL] 테이블 데이터 변경 Update (0) | 2024.05.13 |
[MySQL] 테이블 원하는 컬럼, 데이터만 Select 하기 (0) | 2024.05.13 |
[MySQL] Null, Not Null, Default (0) | 2024.05.13 |