In a table i have columns A,B,C and i have a composite index
on columns A,B if so will the following query uses index or
not?
SELECT sal,name
FROM <table_name>
WHERE A=<value> AND B=<value> AND C=<value>;

Answer Posted / dinesh

Table Access (BY INDEX ROWID)
Filter predicates C=
INDEX(UNIQUE SCAN) A= B=

Here we use "AND" operator that query used index
if we used "OR" its not used Index scan

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does dml mean?

738


Can a varchar be a primary key?

699


What is triggering circuit?

770


Where is pl sql used?

679


How to use distinct and count in sql query? Explain

769






How many sql core licenses do I need?

682


Does view contain data?

788


1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...

2169


how to drop an existing index in mysql? : Sql dba

714


Can we use join in subquery?

779


What is a database event trigger?

799


What are crud methods?

736


What is interval partition?

724


How to find 3rd highest salary of an employee from the employee table in sql?

789


What is the difference between a primary key and a clustered index?

697