insert,delete,update

반응형
반응형

1. 행 추가하기 - INSERT 

   INSERT INTO 테이블명 VALUES(값1, 값2, ...)

아무것도 없는 상태

 

 

insert into sample41 values(1,'aaa','2020-08-08')

 

 

Sql-Study-Organization/SQL_Repository

Contribute to Sql-Study-Organization/SQL_Repository development by creating an account on GitHub.

github.com

 

2. 삭제하기 - delete

 

delete from 테이블 명 where 조건식

 

Edit -> Preferences -> SqlEditor -> 체크표시된거 해제

이거 안하면 수정, 삭제 실습 불가 => 재부팅

다시 제거

 

 

Sql-Study-Organization/SQL_Repository

Contribute to Sql-Study-Organization/SQL_Repository development by creating an account on GitHub.

github.com

 

3. 데이터 갱신하기 Update

Update Set 테이블명 SET 열명1,... 열명n where 조건식

 

update sample41 set a = 'bbb' where a = 'aaa'

 

 

Sql-Study-Organization/SQL_Repository

Contribute to Sql-Study-Organization/SQL_Repository development by creating an account on GitHub.

github.com

 

 

4. 물리 삭제와 논리 삭제

 

Sql-Study-Organization/SQL_Repository

Contribute to Sql-Study-Organization/SQL_Repository development by creating an account on GitHub.

github.com

 

반응형

'sql' 카테고리의 다른 글

데이터베이스 객체 작성과 삭제  (0) 2020.09.10
오라클 jdbc  (0) 2020.09.09
집계와 서브쿼리  (0) 2020.09.09
정렬  (0) 2020.09.07
SELECT  (0) 2020.09.07

댓글

Designed by JB FACTORY