我正在尝试将数据从一个表复制到 3 个表。
我需要将序列值输入到 1 个或多个表中。但我得到一个错误,“这里不允许序列号”
这是我的sql。
INSERT ALL
INTO COM_BOARD(BOD_UID, MNU_UID, BOD_NOTICE, BOD_SUBJECT, BOD_READCNT, BOD_COMMENTCNT, BOD_REF, BOD_LEVEL, BOD_ORDER, BOD_REPLYCNT, BOD_PARENTUID,
BOD_TAG, BOD_OPEN, BOD_STATE, BOD_DELETE)
VALUES(BOD_UID, MNU_UID, 0, BOD_SUBJECT, 0, 0, BOD_UID, 0, 0, 0, 0, 0, 0, 9, 0)
INTO COM_BODCONTENT(CON_UID, BOD_UID, MEM_UID, CON_PW, CON_NM, CON_IP, CON_TY, CON_REGYMD, CON_MODYMD, CON_CONTENT)
VALUES(con_uid, bod_uid, 1, 'adm!!@#!11', 'Admin', '127.0.0.1', 0, input_dt, update_dt, bod_subject)
INTO COM_BODDATA(DAT_UID, BOD_UID, DAT_FILETY, DAT_FILEEXT, DAT_FILENM, DAT_ORGFILENM, DAT_FILESIZE, DAT_DOWNCNT, DAT_STATE)
VALUES(DAT_UID, BOD_UID, 0, FILE_EXT, IMG, IMG, IMG_SIZE, 0, 1)
SELECT SEQ_BODUID.NEXTVAL BOD_UID, SEQ_CONUID.NEXTVAL CON_UID, SEQ_CONDAT_UID.NEXTVAL DAT_UID, 3141 MNU_UID
, DECODE(STATE, 'A', 9, 1) BOD_STATE, DECODE(STATE, 'A', 9, 1) BOD_DELETE, SUBJECT/*_kr .. */ bod_subject
, IMG, IMG_SIZE, SUBSTR(REGEXP_SUBSTR(IMG, '\.\w+'), 2) FILE_EXT, INPUT_DT, INPUT_WRITER, UPDATE_DT, UPDATE_WRITER, CNT
from system.t_near_photo
不能用insert all into ~ into ~ select sequence.nextval ~~
还是我用错了?
感谢您的任何帮助。