Mysql 5: SQL statement 3

Source: Internet
Author: User
Mysql study 5: SQL statement study 3 well, we think this font is quite nice, and we will change it all. The INSERTINTO statement is used to Insert a new row into the table. Syntax: INSERTINTO table name VALUES (,...) We can also specify the column to insert data: INSERTINTOtable_name (column 1, column 2 ,...

Mysql study 5: SQL statement study 3 well, we think this font is quite nice, and we will change it all. The insert into statement is used to INSERT a new row INTO the table. Syntax insert into table name VALUES (1, 2,...) We can also specify the column to INSERT data: insert into table_name (column 1, column 2 ,...

Mysql 5: SQL statement 3

All right, we think this font looks good, and we will change it all.

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

Syntax

Insert into table name VALUES (value 1, value 2 ,....)

You can also specify the columns to insert data:

Insert into table_name (column 1, column 2,...) VALUES (value 1, value 2 ,....)

The Update statement is used to modify data in a table.

Syntax:

UPDATE table name SET column name = new value WHERE column name = A Value

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

Syntax

Delete from table name WHERE column name = Value

Delete a row

"Fred Wilson" will be deleted:

DELETE FROM Person WHERE LastName = 'Wilson' 

Delete all rows

You can delete all rows without deleting a table. This means that the table structure, attributes, and indexes are complete:

Delete from table_nameOr:DELETE * FROM table_name

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.