In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to add, delete, modify and query sentences in mysql. The article is very detailed and has a certain reference value. Interested friends must finish reading it!
Mysql add, delete, modify and query statement operation: 1, use select statement query, code is [SELECT * FROM biao1]; 2, use insert to insert data, code is [INSERT INTO biao1 ()]; 3, use delete to delete data.
Operation of mysql add, delete, modify and query statement:
1. Open sqlyog and establish a new connection to manage the database. Click on the file-"New connection, or click the green button in the picture directly."
2. Then fill in the installed mysql database information, host address, user name, password and database name
3. Then click "Link". If there is no error in the information, the connection information and database-related information will be displayed on the left, while the query box can be found on the right.
4. At the interrogator, first test the query statement to query all the columns that meet the criteria and the query of the specified column.
1.SELECT * FROM biao1
2.select name form biao1
3.SELECT * FROM biao1 WHERE id=6
Selecting the query statement and clicking the execute button will display the results in the picture.
5. Insert the data into the data, fill in the query box with INSERT INTO biao1 (name1,age) VALUES ('add 1 million quotation 1000'), and then click the execute button. If successful, a statement will be displayed for execution. After running the query, you will find that the newly inserted information can also be queried.
6, the following to implement the modification statement, in the query box to write the following code UPDATE biao1 SET name1= "this is a change", age='2000' WHERE id=20 in the database "newly added 1" to "this is a change", change "1000" to "2000", select the statement and then click to execute, and then query will appear the following results, indicating that the modification is successful.
7. Let's delete the data that already exists in the database through id, and change the
Delete the data just modified. If you select it through DELETE FROM biao1 WHERE id='20', you will find that the data has been deleted. If you add it, you will find that id has become 21.
The above is all the contents of how to add, delete, modify and query statements in mysql. Thank you for your reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.