current position:Home>[MySQL] Part 9 MySQL Information Functions
[MySQL] Part 9 MySQL Information Functions
2023-01-25 11:25:38【Tree_wws】
【MySQL】Part 9 MySQL Information Function
9. MySQL information function
MySQL has some built-in functions that can query MySQL information. These functions are mainly used to help database development or operation and maintenance personnel to better maintain the database.
function | Usage |
---|---|
VERSION() | Return the current MySQL version number |
CONNECTION_ID() | Returns the number of connections to the current MySQL server |
DATABASE(), SCHEMA() | Returns the database where the MySQL command line is currently located |
USER(), CURRENT_USER(), SYSTEM_USER(), SESSION_USER() | Returns the username currently connected to MySQL, and the returned result format is "[email protected]" |
CHARSET(value) | Returns the character set of the string value argument |
COLLATION(value) | Returns the comparison rules of the string value |
SELECT VERSION(),CONNECTION_ID(),DATABASE(),USER(),CHARSET('hello'),COLLATION('hello')FROM DUAL;
Other functions
function | Usage |
---|---|
FORMAT(value,n) | returns the result data after formatting the numeric value.n means rounded to n digits after the decimal point |
CONV(value,from,to) | Convert the value of value between different bases |
INET_ATON(ipvalue) | Convert dot-separated IP addresses into a number |
INET_NTOA(value) | Convert numeric IP addresses to dot-separated IP addresses |
BENCHMARK(n,expr) | Repeats the expression expr n times.Used to test the time it takes for MySQL to process the expr expression |
CONVERT(value USING char_code) | Change the character encoding used by value to char_code |
Summary
The above is what I want to talk about today, I hope it will be helpful to everyone!!!
copyright notice
author[Tree_wws],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2023/025/202301251106214493.html
The sidebar is recommended
- MySQL of database: understand some concepts of database
- encrypt-input
- Introduction to systrace (II)
- Mybatisplus through crud interface
- See through react source code at a glance (3): no longer mysterious priority mechanism
- How can MySQL select statements only take the first data? How to get the sum of a column of different individuals? 【LIMIT/GROUP BY】
- JavaScript events
- Detailed explanation of top command parameters in Linux
- Simple summary problems in MySQL 111111
- How to put SQL query results into a grid?
guess what you like
The course of self-study Java collection
This paper briefly describes the node role of Dubbo, a distributed service RPC framework
Common methods of java file class
Java full stack (IV) web page technology: 13 JSTL
MySQL divides a column into multiple columns by commas
Yyds dry inventory # Apriori algorithm example (milk and bread)
Blue bridge cloud lesson introduction to Linux 16: Linux Process Management
How to use signal function in Linux
Rongda Kechuang 100% domestic independent controllable Feiteng ft2000-4 itx motherboard
Rongda Kechuang 100% domestic autonomous controllable Feiteng d2000 / 8 itx motherboard
Random recommended
- Kubernetes(K8s)_ 10_ Authentication mechanism
- The of Apollo learning -- planning theory to practice (10) path_ decider
- Five basic data types of redis
- Linux - installation and management program
- [MySQL] string function
- System commands commonly used in Linux
- Java immortal rabbit problem solving
- Settle the rent within a certain period of time, including the unsettled quantity before settlement?
- UOS operating system - using terminal
- Common command operations of redis data types
- Springboot learning (I)
- Rongda Kechuang 100% domestic self controlled Feiteng d2000 com core board
- Java foundation ~ Java StringBuilder
- The difference between hive SQL and spark SQL
- Linux_ 25_ Linux-SSH
- First acquaintance with redis
- Leave Linux's plans and tasks to your heart
- Can't help but know the common linux commands~
- System working commands commonly used in Linux
- Computer composition principle + operating system
- Dual qsfp + fiber PCIe card based on kinex ultrascale xcku060
- Hosts file exception.
- Query users who have not logged in this week
- New HTML5 features
- MySQL basics -- functions
- Teach you how to manage Linux processes and tasks
- Advanced usage of Java: using type mapping in JNA
- [react] component life cycle
- Linux system server common instructions (continuous update)
- Dijkstra algorithm foundation
- CSS text shadow
- Kafka (III): Kafka consumers
- Java se collection framework
- Hive's awesome function for parsing JSON array
- Kubernetes(K8s)_ 01_ First meet kubernetes
- JAVA hunting talent excellent blogger sharing