-- long 타입을 clob 타입으로 변경후 자가 복제
long 타입문제인지.
table1 자체에 에러가 발생
table 1 과 똑같은 table2 를 만들어서 table2 는 clob 만들었다.
table1 도 long 에서 clob 으로 변경 table1 을 table2 로 복사
DECLARE
BEGIN
DECLARE
CURSOR CURSOR_NAME
IS
SELECT
PRODUCT_ID, PRODUCT_NAME, PRICE, DESCRIPTION, PICTURE_URL, REGDATE, AMOUNT, PRODUCT_STATE, BIG_DESCRIPTION,
CATEGORY_IDX, CATEGORY_BNO, CATEGORY_RNO, DELIVER, DELIVER_MONEY, UPDATEDATE,VIEW_COUNT
FROM product2;
BEGIN
FOR I IN CURSOR_NAME
LOOP
INSERT INTO
product2
(
PRODUCT_ID, PRODUCT_NAME, PRICE, DESCRIPTION, PICTURE_URL, REGDATE, AMOUNT, PRODUCT_STATE, BIG_DESCRIPTION,
CATEGORY_IDX, CATEGORY_BNO, CATEGORY_RNO, DELIVER, DELIVER_MONEY, UPDATEDATE,VIEW_COUNT
)
VALUES (
seq_product.NEXTVAL, I.PRODUCT_NAME, I.PRICE, I.DESCRIPTION, I.PICTURE_URL, I.REGDATE,
I.AMOUNT, I.PRODUCT_STATE, I.BIG_DESCRIPTION, I.CATEGORY_IDX, I.CATEGORY_BNO,
I.CATEGORY_RNO, I.DELIVER,I.DELIVER_MONEY, I.UPDATEDATE,
I.VIEW_COUNT
);
END LOOP;
END;
END;
DECLARE
BEGIN
DECLARE
CURSOR CURSOR_NAME
IS
SELECT
PRODUCT_ID, PRODUCT_NAME, PRICE, DESCRIPTION, PICTURE_URL, REGDATE, AMOUNT, PRODUCT_STATE, BIG_DESCRIPTION,
CATEGORY_IDX, CATEGORY_BNO, CATEGORY_RNO, DELIVER, DELIVER_MONEY, UPDATEDATE,VIEW_COUNT
FROM product2;
BEGIN
FOR I IN CURSOR_NAME
LOOP
INSERT INTO
product2
(
PRODUCT_ID, PRODUCT_NAME, PRICE, DESCRIPTION, PICTURE_URL, REGDATE, AMOUNT, PRODUCT_STATE, BIG_DESCRIPTION,
CATEGORY_IDX, CATEGORY_BNO, CATEGORY_RNO, DELIVER, DELIVER_MONEY, UPDATEDATE,VIEW_COUNT
)
VALUES (
seq_product.NEXTVAL, I.PRODUCT_NAME, I.PRICE, I.DESCRIPTION, I.PICTURE_URL, I.REGDATE,
I.AMOUNT, I.PRODUCT_STATE, I.BIG_DESCRIPTION, I.CATEGORY_IDX, I.CATEGORY_BNO,
I.CATEGORY_RNO, I.DELIVER,I.DELIVER_MONEY, I.UPDATEDATE,
I.VIEW_COUNT
);
END LOOP;
END;
END;
댓글 ( 4)
댓글 남기기