Multiple choice technology databases

An application developer wants to query row count of a table, ORDERS which has millions of records. ORDERS table has composite PRIMARY KEY on (ORDER_ID, CUSTOMER_ID) columns and those two columns appear at position 1 and 2 respectively in the ORDERS table. Which query will be more efficient?

  1. select count(*) from orders;

  2. select count(1) from orders;

  3. select count(3) from orders;

  4. select count(5) from orders;

Reveal answer Fill a bubble to check yourself
B Correct answer