Oracle SYSTIME 넣는 방법

archymi·2022년 7월 22일
0
drop table test;

create table test (
t1 VARCHAR2(17) primary key,
t2 varchar2(17)
);

insert into test values (TO_CHAR(SYSTIMESTAMP, 'YYYYMMDDHH24MISS'), '1');
commit; 

select * from test;
  • Sequence 넣기
create table TEST(
    idx number(10),
    name    varchar(1000)
);

CREATE SEQUENCE TEST_SEQ START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 99999999999999999999 NOCYCLE CACHE 20;

INSERT INTO TEST values (TEST_SEQ.NEXTVAL, 'test');
commit;

0개의 댓글