我想做一個INSERT INTO與SELECT和值,但沒有作品。即時嘗試使插入與選擇和價值
TABLE SOURCE:
CREATE TABLE "MICV_PRE"."TS$SEQUENCES"
(
"ID_NODE" NUMBER DEFAULT 1 NOT NULL ENABLE,
"ID_TASK" NUMBER DEFAULT 1 NOT NULL ENABLE,
"ID_DOCUMENT" NUMBER DEFAULT 1 NOT NULL ENABLE,
"ID_WORD" NUMBER DEFAULT 1 NOT NULL ENABLE,
"ID_TEAM" NUMBER DEFAULT '1' NOT NULL ENABLE)
修改表中:
CREATE TABLE TS$SEQUENCES_NEW(
"ID_CODE" VARCHAR(255 CHAR) NOT NULL ENABLE,
"CODE_SUBSEQUENCE" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"VALUE" NUMBER(10,0) NOT NULL ENABLE
);
表源:
id_task | id_node | id_word
10 | 20 | 30
表來修改:
id_code | code_subsequence | value
"id_task" | "empty" | 10
"id_node" | "empty" | 20
"id_word" | "empty" | 30
你試過的SQL代碼是什麼? – Tobias 2011-04-05 12:59:35
INSERT INTO TS $ SEQUENCES_NEW從TS $ SEQUENCES中選擇TS $ SEQUENCES.ID_TASK作爲「VALUE」,「ID_TASK」作爲「ID_CODE」,「VACIO」作爲「CODE_SUBSEQUENCE」; – petercartagena 2011-04-05 13:03:45