Oracle statement INSERT into Select how to add a subsequent insert condition

Source: Internet
Author: User
Tags bulk insert
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.