Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
各行のIDを増やして2列の値を変更しながら、行を複製したいOracle SQLテーブルがあります。したがって、擬似コードは次のようになります。
for each row r in TABLE t new n = r n.id = r.id+1 n.columnA = 12 n.columnB = 13 insert n into t
誰かがOracle SQLでこれを行う方法を示すことができますか?
insert into t(id, columnA, columnB) select id + 1, 12, 13 from t;