In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to add, delete, modify and search in the MySQL database, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
1. Insert into all fields
2. Insert into the specified field
Second, modify the data
Of course, we can also modify the data according to conditions, such as filtering using where, but only the simplest one is given here.
3. Delete data
Conditional deletion can also be carried out according to where.
Fourth, query data
This query data is the most troublesome, we give some common queries here.
1. Query all fields and some fields
2. Use distinct to remove duplicate data
3. Use limit to specify the number of rows of query results
4. Use order by to sort the results
5. Use where for conditional query
(1) comparison operator
(2) arithmetic and logic operators
To give two examples, other operators are used similarly:
6. Multi-table query
First, give two tables:
(1) Internal join: only values with equal id in both tables are returned
(2) left join: returns all records in the left table, as well as records equal to those in the right table
(3) right join: returns all records including all records in the right table and records equivalent to those in the left table
7. Subquery
That is, there is a set of queries in the query.
There are too many uses here, and it's too troublesome. So this is the simplest example.
8. Group query
(1) grouping using group by
(2) use having to set conditions
9. Regular expressions
Regular expression is the most flexible and highly used one.
The above content is how to add, delete, change and search operations in the MySQL database. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.