데이터베이스 관련/DB

[데이터베이스/DB] 데이터베이스 테이블 데이터(삽입, 수정, 확인)

CE : 하랑 2022. 3. 21. 21:28

 

 

데이터베이스

 

데이터베이스 테이블 데이터 삽입

명령어 : insert into 테이블명 values(삽입할 값);

ex) insert into test values('1','AA','11');

 

 

 

데이터베이스 테이블 데이터 일부 삽입

명령어 : insert into 테이블명  (데이터명) values(데이터값);

ex) insert into test  (no,code) values('2','BB');

 

 

 

데이터베이스 테이블 모든 데이터 확인

명령어 : select * from 테이블명; 

ex) select * from test;

 

 

 

데이터베이스 테이블 데이터 수정

명령어 :  update test set 변경할데이터명='12' where 변경할기준데이터명='2';

ex)  update test set num='12' where no='2';

num=Null -> num=12

 

 

 

 

데이터베이스 테이블 모든 데이터 확인

명령어 : select * from 테이블명; 

ex) select * from test;