Oracle Database Manipulation Language DML

Source: Internet
Author: User

Oracle Database Manipulation Language: DML Add data: (1) Add data directly: INSERT INTO table_name (column_name1,column_name2,...) VALUES (Data1,data2 ...);(2) is added via other data tables (the target table already exists): INSERT INTO table_name (column_name1,column_name2,...)SelectColumn_name1,column_name2 ... fromtable_name2; (3add data to create a table at the same time (target table to create): CREATE TABLE table_name as SelectColumn_name1,column_name2,... fromsource_table; Modify data: Update table_nameSetColumn_name1=data1,column_name2=data2,... [wherecondition]; Delete data in table: (1) Condition Delete: Delete fromtable_name [wherecondition];(2) Delete all: TRUNCATE TABLE table_name; Simultaneous modification and addition: merge [into] table_name1usingtable_name2 on (condition) when matched and merge_update_clause when isn't matched then Merge_insert_claus E; (1) Omit the added statement merge into loginusingmanagerinfo on (login.login_id=Managerinfo.managerid) When matched then updateSetLogin.loginname =Managerinfo.loginname; (2) Omit the modified statement merge into login on (login.login_id=Managerinfo.managerid) when matched and then insert values (managerinfo.loginname,managerinfo.password,manageri Nfo.managerid);(3) Add and modify simultaneous merge into loginusingmanagerinfo on (login.login_id=Managerinfo.managerid) When matched then updateSetLogin.loginname =Managerinfo.loginname When isn't matched then insert values (managerinfo.loginname,managerinfo.password,manageri Nfo.managerid);

Oracle database manipulates language DML

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.