SQL/ORACLE SQL

INSERT INTO : 테이블에 데이터 추가

HicKee 2022. 11. 1. 14:42

데이터 추가

insert into 테이블명 values 컬럼 데이터

예시

INSERT INTO customer_t (name,age,gender,rdate) 
VALUES ('홍길동',100,'M',sysdate);

컬럼 명시 개수와 데이터의 개수가 일치해야함
반대의 경우도 오류 발생

INSERT INTO customer_t (name,age,gender) 
VALUES ('홍길동',100,'M',sysdate);

오류 : ORA-00913
INSERT INTO customer_t (name,age,gender) 
VALUES ('홍길동',100,'M',sysdate);

오류 : ORA-00913

생략 할경우 모든 정보를 넣어줘야 함

insert into customer_t
values ('김길동',50,'M',sysdate);

'SQL > ORACLE SQL' 카테고리의 다른 글

SELECT : 검색  (0) 2022.11.01
TABLE EXAMPLE  (0) 2022.11.01
연습 - 테이블 생성  (0) 2022.11.01
CREATE TABLE : 테이블 생성 & 데이터 타입  (0) 2022.10.31
Oracle Database XE, Sql developer 설치  (0) 2022.10.31