Oracle statement INSERT into Select how to add subsequent insert conditions 2014-01-21 10:48 anonymous Category: Other programming Languages | browse 2,746 times
There are BULK INSERT statements in Oracle INSERT INTO TableA (column 1, column 2, column 3) Select column 1, column 2 from TableB. Now the problem is this, TableA has 3 columns, and the last SELECT statement is the only column 1 and column 2 that can be obtained. But column 3 is non-empty, so it must be filled in when inserted. How do I add SQL after this statement to complete the insertion?? My little brother is kneeling thanks!!!
A in 3 cases, b you can only get 2 columns, you can use the constant placeholder to solve
INSERT INTO TableA (column 1, column 2, column 3) Select column 1, column 2, constant from TableB
Example: The following
INSERT INTO TableA (column 1, column 2, column 3) Select column 1, column 2, ' 123 ' from TableB "string constant"
INSERT INTO TableA (column 1, column 2, column 3) Select column 1, column 2,123 from tableB "Numeric Constant"
Oracle statement INSERT into Select how to add a subsequent insert condition