[英]How to copy all records and add some changes in the same table in OracleDB
我想將所有記錄復制到同一個表中並進行一些更改。 有人告訴我一個好方法嗎?
我試過了。 但未結束錯誤發生。 我該如何修復它?
CREATE TEMPORARY TABLE "TestScheme".tmp_history FROM history;
UPDATE tmp_history set
birthday = ADD_MONTHS(birthday,-24),
TRD_SEQ = replace('Stack','poo','pee')
INSERT INTO history SELECT * FROM "TestScheme".tmp_history
ORA-00933:"SQL 命令未正確結束" 00933. 00000 - "SQL 命令未正確結束" *原因:
*行動:
create table tmp_history as
select * from history
where card_no = 'XXXX3';
update tmp_history set
birthday = add_months(birthday, -24),
trd_seq = replace('Stack', 'poo', 'pee');
insert into history
select * from tmp_history;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.