1. Add a table that passes the structure and data of another table
CREATE TABLE XTHAME.TAB1 as SELECT * from Dsknow.combdversion
2. If the table exists:
INSERT INTO TAB1 select * from TAB2;
3. In the same table, assign the reference to the A field to the B field:
UPDATE table_name Set B = A;
4. Inserting field data from one table into the field data of another table
Insert into XTHAME.TAB1 (pk_bdversion,vbdcode) select Pk_bdversion,vbdcode from Dsknow.combdversion;
* If alert: ORA-00928: Missing SELECT keyword error
The reason is: here Tab1 (Field1,field2,....) Cannot add single quotation marks
5.4th extends multiple fields of multiple tables, inserting multiple fields of the same table.
INSERT into Xthame. BUTTON (button_id, Button_name, Button_code) Select A.pk_examquest, B.pk_bdversion,a.vquestname from Dsknow. Combdversion B, Dsknow. Rqt_examquest a where a.pk_examquest= ' 1001sx1000000000jobv ' and b.pk_bdversion= ' 1000bdv1000010101001 ';
get "" Java background Framework SPRINGMVC Integration MyBatis Framework source bootstrap HTML5 MySQL Oracle
Oracle queries one table for inserting data into another table