Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create information-functions.md #197

Merged
merged 3 commits into from
Sep 28, 2017
Merged

Create information-functions.md #197

merged 3 commits into from
Sep 28, 2017

Conversation

lilin90
Copy link
Member

@lilin90 lilin90 commented Sep 18, 2017

PTAL

@lilin90 lilin90 requested a review from QueenyJin September 18, 2017 03:04

# Information Functions

For information functions, TiDB behaves the same as MySQL. For more information see [Information Functions](https://dev.mysql.com/doc/refman/5.7/en/information-functions.html).
Copy link
Contributor

@QueenyJin QueenyJin Sep 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In TiDB, the usage of information functions is similar to MySQL. For more information, see

| [`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 rows that would be returned were there no `LIMIT` clause |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were there no LIMIT clause -> If there was no LIMIT clause

@QueenyJin
Copy link
Contributor

Please also add to sql/readme.md

@QueenyJin QueenyJin merged commit fe42f62 into master Sep 28, 2017
@QueenyJin QueenyJin deleted the information-functions branch September 28, 2017 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants