본문 바로가기
2019/ORACLE

SQL 테이블 생성

by SOLYI 2019. 11. 14.

@테이블생성
SQL> create table sample(
  2  name varchar2(20)
  3  , sal number(3)
  4  , deptno number(3)
  5  );

@값넣기
SQL> insert into sample values('a', 100, 10);
1 row created.
SQL> insert into sample values('a',100,20);
1 row created.
SQL> insert into sample values('a',30,10);
1 row created.
SQL> commit;
  2  Commit complete.
@ 테이블 생성 후 자료만들고 거기서 검색
SQL> create table t1(name varchar2(20));

Table created.

SQL> insert into t1 values('aaa');

1 row created.

SQL> insert into t1 values('aba');

1 row created.

SQL> insert into t1 values('aca');

1 row created.

SQL> insert into t1 values('a_a');

1 row created.

SQL> commit;

SQL> select * from t1;

반응형

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

SQL 숫자 표현 (to char)  (0) 2019.11.14
SQL NULL값  (0) 2019.11.14
SQL 숫자 함수  (0) 2019.11.14
SQL 데이터형  (0) 2019.11.14
SQL 정렬 (ORDER BY ASC, ORDER BY DESC)  (2) 2019.11.14