sql 数字查询 加引号 影响效率

WBOY
Release: 2016-06-20 12:44:40
Original
1149 people have browsed it

select * from [Table1] where [ID] = 10
select * from [Table1] where [ID] = '10'

这2种哪种效率更高,区别大吗


回复讨论(解决方案)

理论上是一样的
不过值被引号括起后,表示的是字符串
你的 sql server 是否支持字符串隐式的转换成数值?

几乎没有区别,一样快。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template