create table tbl_bbs (
bbsno number,
title varchar2(500) not null,
content varchar2(2000),
writer varchar2(50),
regdate date default sysdate,
viewcnt number default 0
);
alter table tbl_bbs add CONSTRAINT
pk_bbs primary key (bbsno);
create sequence seq_bbs;
insert into tbl_bbs
(bbsno, title, content, writer)
values (seq_bbs.nextval, '제목..14134525245245', '내용..34563623563456', 'user00');
--------------------------------------------------------------------------------------------
create table tbl_reply (
replyno number not null,
bbsno number not null,
replyer varchar2(50) not null,
reply varchar2(1000) not null,
regdate date default sysdate,
moddate date default sysdate
);
select * from tbl_reply;
alter table tbl_reply add CONSTRAINT
pk_reply primary key (replyno);
insert into tbl_reply
(REPLYNO, BBSNO, REPLYER, REPLY)
values (seq_reply.nextval, 1048577, '이XX', '박XX 바보');
create table tbl_store2 as (select * from tbl_store );
create table tbl_user2 as (select * from tbl_user );
create table tbl_menu2 as (select * from tbl_menu );
create table tbl_review2 as (select * from tbl_review );
'코딩 > Oracle' 카테고리의 다른 글
Oracle SQL - Toy Data 데이터 만들기 (0) | 2014.09.13 |
---|---|
JDBC 연결 예제 3 - Try ~ With (0) | 2014.09.13 |
JDBC 연결 예제 1 - Template Method Pattern (0) | 2014.09.13 |
Oracle SQL - JDBC 연결 및 쓰레드를 이용한 반복 연결 예제 (0) | 2014.09.13 |
Oracle SQL - 4지선다 문제 Decode 예제 (0) | 2014.09.13 |