mysql查询类型转换
来源:互联网 发布:手机淘宝怎么投诉盗图 编辑:程序博客网 时间:2024/06/04 18:32
在mysql查询时最好不要发生类型转换,如把varchar转换成int
mysql> explain select * from user where name=1\G
//如果你确定name字段是整型就不要把它转化成字符串,不加单引号
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: user
type: ALL
possible_keys: index_name_password
key: NULL
key_len: NULL
ref: NULL
rows: 99727
Extra: Using where
1 row in set (0.02 sec)
mysql> explain select * from user where name='1'\G
//如果你确定name字段是字符串就不要把它转化成整型,加单引号
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: user
type: ref
possible_keys: index_name_password
key: index_name_password
key_len: 111
ref: const
rows: 1
Extra: Using where
1 row in set (0.00 sec)
- mysql查询类型转换
- mysql 查询 int类型日期转换成datetime类型
- mysql 查询 int类型日期转换成datetime类型
- mysql 查询 int类型日期转换成datetime类型
- Mysql 数字类型转换
- mysql 类型转换函数
- mysql类型转换
- mysql 类型转换函数
- mysql 类型转换
- MySQL类型转换注意事项
- mysql 转换类型
- mysql 字段类型转换
- Mysql强制类型转换
- MySQL类型转换
- Mysql 查询时间转换
- 简单的查询类型转换
- oracle查询时类型转换
- mysql查询的存取类型
- #西柚姨妈体#蹿红微博 流行体之风重袭网络
- MFC创建一个非模态对话框
- 为什么要使用“var me=this”这样的写法
- 循环队列和队列
- ios学习之UITextField特性
- mysql查询类型转换
- 用Wireshark保存RTP的负载码流
- 飘逸的python - 理解打开文件的模式
- Android之ListView原理学习与优化总结
- C#入门
- python中numpy介绍
- Evaluation version of Huge-ASP upload was expired
- 【程序员的自我修养】第2章 编译和链接
- hdu 2612(dfs)