MySQL Forums
Forum List  »  General

search criteria - int datatype
Posted by: Seema Bhatia
Date: December 11, 2012 05:47PM

Query - col1 and col2 are both int
col2 is primary
col1 also has non clustered index
1) update table1 set col1 = 12 where col2 = '13'

2) update table1 set col1 = '12' where col2 = 13

How these queries will behave?
Are there performance issues as numbers are enclosed in quotes.

I know at mysql will do implicit conversion. Will it take benefit of indexes in both the queries.

Options: ReplyQuote

Written By
search criteria - int datatype
December 11, 2012 05:47PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.