둘셋 개발!

SQL의 insert, select , update, delete 구문 본문

데이터베이스

SQL의 insert, select , update, delete 구문

23 2021. 11. 3. 12:22

문법을 굳이 암기할 필요는 없고 필요할 때 잘 검색하는 것이 중요하다.

 

그래도 정리를 해보자면

 

1. insert into table(column1,column2) values (data1, data2);

2. select column1,column2 from table where 조건;

 

3. update table sey column1 = data1, column2 = data2 where 조건;

    -> where문에서 조건을 만족시키는 행만 update 함

 

4. delete from table where 조건;

    -> where문을 입력하지 않으면 테이블 전체가 삭제되기 때문에 조심해야함...