1.VERSION ()
Usage: Returns the version of the MySQL server
Example:
mysql> select VERSION (); + -- ---------+ | VERSION () | + -- ---------+ | 5.6 . 10 | + -- ---------+ 1 row in set (0.00 sec)
2.USER (), System_user ()
Usage: Returns the currently logged in user name
Example:
Mysql> Select USER();+----------------+| USER()|+----------------+|Root@localhost |+----------------+1Rowinch Set(0.00sec) MySQL> Select System_user();+----------------+| System_user()|+----------------+|Root@localhost |+----------------+1Rowinch Set(0.00Sec
3.DATABASE ()
Usage: Returns the current database name
Example:
MySQL>SelectDATABASE(); + -- ----------+ | DATABASE | + -- ----------+ | Test | + -- ----------+ 1 inch Set (0.00 sec)
4.found_rows ()
Usage: Returns the number of record rows returned by the last select query (not limited by the limit statement)
Example:
MySQL>Select found_rows (); + -- ------------+ | | + -- ------------+ | 1 | + -- ------------+ 1 inch Set (0.00 sec)
5.LAST_INSERT_ID ()
Usage: Returns the value of the last AutoIncrement ID that is automatically generated by the system (the inserted ID of the first record that is returned when multiple records are inserted at the same time)
Example:
mysql> select last_insert_id (); + -- ----------------+ | last_insert_id () | + -- ----------------+ | 0 | + -- ----------------+ 1 row in set (0.02 sec)
6.CONNECTION_ID ()
Usage: Returns the connection ID of the current customer
Example:
mysql> select connection_id (); + -- ---------------+ | connection_id () | + -- ---------------+ | 1 | + -- ---------------+ 1 row in set (0.00 sec)
7.CHARSET (str)
The character set that returns the string str
Example:
Mysql> SelectCHARSET ('MYSQL');+------------------+|CHARSET ('MYSQL')|+------------------+|Utf8|+------------------+1Rowinch Set(0.04Sec
MySQL System Information function