MySQL learning five: SQL statement learning 3

Source: Internet
Author: User

Well, people think that this kind of font is still better looking, all of us to change such a font.

The INSERT INTO statement is used to insert a new row into the table.

Grammar

INSERT INTO 表名称 VALUES (值1, 值2,....)

We can also specify the columns to insert the data into:

INSERT INTO table_name (列1, 列2,...) VALUES (值1, 值2,....)

The Update statement is used to alter the data in the table.

Grammar:

UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值

The DELETE statement is used to delete rows in a table.

Grammar

DELETE FROM 表名称 WHERE 列名称 = 值

Delete a row

"Fred Wilson" will be removed:

Delete all rows

The ability to delete all rows without deleting the table. This means that the structure, properties, and indexes of the table are complete:

  DELETE from table_name  or:  Delete * FROM table_name   
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.