Mysql:函數之一:information functions

來源:互聯網
上載者:User
Name Description
BENCHMARK(cont,expr) Repeatedly execute an expression主要是測試計算密集型的標量運算式——類似於壓力測試。如果是查詢,必須單行單列
CHARSET(str)(v4.1.0) Return the character set of the argument
COERCIBILITY(str)(v4.1.1) Return the collation coercibility value of the string argument
COLLATION(str)(v4.1.0) Return the collation of the string argument
CONNECTION_ID() Return the connection ID (thread ID) for the connection串連的會話或線程ID
CURRENT_USER(), CURRENT_USER Return the user name and host name combination從mysql伺服器帳號管理中獲得的對應當前會話使用者的真實登入認證使用者,兩者可能不同。該函數是和特定的安全上下文相關的!如果sqlserver的current_user()——隨調用的安全上下文變化可能和登入的user()、許可權都不相同
DATABASE()、SCHEMA()(v5.0.2) Return the default (current) database name當前資料庫,可能是null
FOUND_ROWS() For a SELECT with a LIMIT clause, the number of rows that would be returned
were there no LIMIT clause
select語句查詢到合格行數——該函數會忽略limit子句的影響
LAST_INSERT_ID() Value of the AUTOINCREMENT column for the last INSERT
ROW_COUNT()(v5.0.1) returns the number of rows updated, inserted, or deleted by the preceding
statement. This is the same as the row count that the mysql
client displays and the value from the mysql_affected_rows() C API function.和sqlserver的@@rowcount對應
USER()、SYSTEM_USER()、SESSION_USER() Return the current user name and host name是從真實的串連環境中獲得的完全限定使用者名稱,與真實的登入認證使用者可能不同。
VERSION() Returns a string that indicates the MySQL server
version
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.