数据库查询0到10000和10000到20000哪个的效率更高

数据库查询0到10000和10000到20000哪个的效率更高,第1张

数据库查询0到10000和10000到20000哪个的效率更高

create table t5 ( item varchar(20))

insert t5 select '1-10000'

union all select '10000-20000'

union all select '20000-30000'

union all select '40000-50000'

----select

select * from table where score between 0 and 100

select * from table where score <=100

---insert

declare @score int

set @score=...

if @score<=100

begin

insert into table(...,score,...) values(...,@score,....)

end


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/9956354.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-03
下一篇 2023-05-03

发表评论

登录后才能评论

评论列表(0条)

保存