By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,301 Members | 3,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,301 IT Pros & Developers. It's quick & easy.

In implicit conversions between char & varchar, are indexes used?

P: 33
I have a table whose indexed column is a char(16) field. I am giving the schema.

CREATE TABLE Emp(Empno char(16),
Ename varchar(25),
Salary number(10,2),......)
Now, there is an index on the Empno field. Now, inside a stored procedure, I am executing a statement
select Name=Ename from Emp where Empno=@eno
This @eno is varchar(25). So, SQL Server would do the implicit conversion between the char & varchar types in this query. Does this query use indexes?
If implicit conversion occurs between number & varchar2(in Oracle), indexes are naturally not used. But, how about the conversion between char & varchar?
Want some suggestions
Jun 8 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.