Discussion on the experience of DB2 database use

Source: Internet
Author: User
Tags definition db2 table name

DB2 Database Use

DML (Data manipulation Language commands) Manipulation language

DDL (data definition Language commands) database definition language

TCC (Transaction control commands) transaction controls language

SCC (System control commands) systems controlling language

A DML data manipulation language

(i) data query command

Select < query content > from < table name >

where < conditions >/*in,between,like% or _*/

Group by< Group Content >

Internal conditions > of having< Group

Order by< Sort Content >[asc/desc];

(ii) Data Update command

1. Data Insertion Command

(1).具体的值插入表中
      Insert into <表名> [(列名表)]
        values<值表1>,<值表2>,<值表2>...
    (注: 日期,字符型值加引号)
   (2).将其它表满足条件的数据插入到一个表中
     Insert into <表名> [<列表名>] <select 子句>

2. Data Modification Command

Update < table name > set < column name 1>=< expression 1>,< column name 2>=< expression 2> .... [where< conditions >];

Update < table name > set < column name 1>= (< SELECT clause >) [where< condition >];

3. Data Deletion command

Delete from < table name > [where< conditions >];

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.