Mysql:函数之一:information functions

NameDescription
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_USERReturn 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值