In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
[text]
First, the introduction of navicat: (third-party visual client to facilitate the management and maintenance of MySQL database)
NavicatTM is a fast, reliable and affordable database management tool designed to simplify database management and reduce system management costs. It is designed to meet the needs of database administrators, developers and small and medium-sized enterprises. Navicat is built with an intuitive graphical user interface that allows you to create, organize, access, and share information in a secure and simple way.
Navicat is famous in the world, trusted by major enterprises, government institutions and educational institutions all over the world, and is a necessary working partner for people from all walks of life every day. It is recognized as the most popular MySQL front-end user interface tool in the world. It can be used to manage and develop local or remote MySQL, SQL Server, SQLite, Oracle and PostgreSQL databases.
2. Installation of navicat:
Download website: http://www.navicat.com.cn/
Just download the required version.
After installation, the interface that opens is as follows:
We can enter commands in the query Editor in navicate, and then click "run" to view the results:
Second, common aggregate functions: (aggregation means aggregation)
Common aggregate functions are as follows:
1. AVG: find the average
2 、 COUNT
3 、 MIN / MAX
4 SUM
Let's take the following table as an example:
1. AVG: find the average
AVG ([DISTINCT] expr)
Explanation: returns the average of expr. The DISTINCT option can be used to return the average of different values of expr.
For example: query the average age. The commands and results are as follows:
2. COUNT (expr): returns the number of rows retrieved by the SELECT statement.
SELECT COUNT (*) FROM tab_teacher;-returns the number of rows retrieved, regardless of whether they contain null values
SELECT COUNT (name) FROM tab_teacher;-returns the number of non-null values in the row retrieved by the SELECT statement.
3. MIN/MAX: find the minimum and maximum.
4. SUM: summation
Third, control flow function:
Common control flow functions are as follows:
CASE
IF
IFNULL
NULLIF
Let's still use the following table as an example:
1 、 CASE:
CASE value WHEN [compare-value1] THEN result1 [WHEN [compare-value2] THEN result2 [ELSE result3] END
Explanation: match with value value, return result1 if value1 and value match, return result2 if value2 and value match, and so on; otherwise, return result3 after ELSE. If there is no value for the ELSE section, the return value is NULL. This sentence pattern is similar to switch ·case ·default in Java.
For example:
2 、 IF:
IF (expr1,expr2,expr3)
Explanation: if the expression expr1 is TRUE, the return value of IF () is expr2;, otherwise the return value is expr3. Similar to the trinomial operator.
For example:
3 、 IFNULL:
IFNULL (expr1,expr2)
Explanation: if expr1 is not NULL, the function returns expr1; otherwise, if expr1 is NULL, the function returns expr2.
For example:
4 、 NULLIF:
NULLIF (expr1,expr2)
Explanation: if expr1 = expr2 is established, the return value is NULL, otherwise the return value is expr1
For example:
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.