Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Insert data and add statements in MySQL data Table

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Each database has the function of adding, deleting, changing and querying, so let's briefly talk about the usage of MySQL INSERT statements.

The MySQL INSERT statement allows you to insert one or more rows into a table

INSERT INTO table (column1,column2...) VALUES (value1,value2,...); first, after the INSERT INTO clause, specify the table name and the list of comma-separated columns in parentheses. Then, place the comma-separated values of the corresponding columns in parentheses after the VALUES keyword. two, MySQL INSERT-insert multiple lines of INSERT INTO tasks (subject,start_date,end_date,description) VALUES ('task-1') ('task-1'), ('task-2'), ('task-2)), (' task-2), ('task-2), (' task-3), ('task-3), ()

Note that it is not necessary to specify a value for an auto-incrementing column, such as an id column, because MySQL automatically generates a value for the auto-increment column.

The article is from http://www.huthon.com.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report