Home Update all or only where oldvalue<>newvalue?
Reply: 0

Update all or only where oldvalue<>newvalue?

user437 Published in July 21, 2018, 9:48 am

I'm using SQL server 2014.

Which would run faster, why, and is there a way to use the analyzer to find out:

update tablename set flname=replace(flname,'(','')

update tablename set flname=replace(flname,'(','') where flname<>replace(flname,'(','')

No indices on flname field. I could create one though. I expect the where would filter out about 90% of rows.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.312775 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO