Skip to content

Commit

Permalink
Create information-functions.md (pingcap#197)
Browse files Browse the repository at this point in the history
* Create information-functions.md

* Address comments

* Add link for information functions
  • Loading branch information
lilin90 authored and QueenyJin committed Sep 28, 2017
1 parent 50cbcb3 commit fe42f62
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ TiDB supports the SQL-92 standard and is compatible with MySQL. To help you easi
- [Cast Functions and Operators](cast-functions-and-operators.md)
- Bit Functions and Operators
- [Encryption and Compression Functions](encryption-and-compression-functions.md)
- Information Functions
- [Information Functions](information-functions.md)
- JSON Functions
- Functions Used with Global Transaction IDs
- [Aggregate (GROUP BY) Functions](aggregate-group-by-functions.md)
Expand Down
24 changes: 24 additions & 0 deletions sql/information-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Information Functions
category: user guide
---

# Information Functions

In TiDB, the usage of information functions is similar to MySQL. For more information, see [Information Functions](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html).

## Information Function Descriptions

| Name | Description |
|:-----|:------------|
| [`CONNECTION_ID()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_connection-id) | Return the connection ID (thread ID) for the connection |
| [`CURRENT_USER()`, `CURRENT_USER`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_current-user) | Return the authenticated user name and host name |
| [`DATABASE()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_database) | Return the default (current) database name |
| [`FOUND_ROWS()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_found-rows) | For a `SELECT` with a `LIMIT` clause, the number of the rows that are returned if there is no `LIMIT` clause |
| [`LAST_INSERT_ID()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_last-insert-id) | Return the value of the `AUTOINCREMENT` column for the last `INSERT` |
| [`SCHEMA()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_schema) | Synonym for `DATABASE()` |
| [`SESSION_USER()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_session-user) | Synonym for `USER()` |
| [`SYSTEM_USER()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_system-user) | Synonym for `USER()` |
| [`USER()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_user) | Return the user name and host name provided by the client |
| [`VERSION()`](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_version) | Return a string that indicates the MySQL server version |
| `TIDB_VERSION` | Return a string that indicates the TiDB server version |

0 comments on commit fe42f62

Please sign in to comment.