Insert a Table query result to another table in Oracle

Source: Internet
Author: User


Insert the query results of one table in Oracle to table 1 and Oracle database. Generate and import the query results of one table to a new table. Www.2cto.com. For example, if only table A is available, query table A and import the result to table B. Use the following SQL statement: the SQL code create table B as select * from A 2. The Oracle Database supports importing the query results to another table. For example, there are two tables A and B 1) if the two tables have the same structure but the field type to be inserted is the same: www.2cto.com (1) insert all the field data of Table A into Table B: SQL code insert into B select * from A; (2) insert data of some fields in Table A into Table B: SQL code insert into B (field name) (select field name from A) 2) If you do not add A schema before the table name in the same schema, for example, schema X and Y: SQL code insert into Y. B select * from X. A

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.