Mysql:函数之一:information functions
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 |
分类:
Mysql
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)