Data manipulation language DML and operators

Source: Internet
Author: User

Data Manipulation language DML (add, modify, delete)

1. Add data INSERT INTO

Insert into Table name (field list) VALUES (value list), the value list to match the field list in order.

Insert into table name values (value list) for all field data insertions, and the list of values to match the field list in order.

2. Modify the Update

Update table name set field name 1= value 1, field name 2= value 2 ... where condition.

If you do not add a where condition is a full table update.

3. Remove Delete

Select Delete: delete [from] table name where condition, not write from can also be executed.

Full table Delete: delete [from] table name, can be restored but inefficient.

TRUNCATE table name, the essence is to delete the table, and then build the table, but can not be restored.

Operator

1. Arithmetic operators

+ - * /

2. Comparison operators

> Greater than

>= greater than or equal to

< less than

<= less than or equal to

= equals

! = is not equal to <> is not equal to

3 logical operators

And and

OR OR

Not non (used in conjunction with other keywords)

|| String link (Oracle-specific)

Data Query Language DQL

Get the data that meets the criteria from the table select

Select*from the name of the table, querying all the data in the table. (Select and from must appear in pairs)

* denotes all fields and can be replaced by the name of the field you want to query.

Data manipulation language DML and operators

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.