1z0-071 Oracle Datbase 12c SQL

Loading demo links...

Showing 10–12 of 15 questions

Question 10

You need to display the first names of all customers from the CUSTOMERS table that contain the character ‘e’ and have the character ‘a’ in the second last position.

Which query would give the required output?

Select an option, then click Submit answer.

  • SELECT cust_first_name
    FROM customers
    WHERE INSTR(cust_first_name, ‘e’)<>0 AND SUBSTR(cust_first_name, -2, 1)=’a’;

  • SELECT cust_first_name
    FROM customers
    WHERE INSTR(cust_first_name, ‘e’)<>'' AND SUBSTR(cust_first_name, -2, 1)=’a’;

  • SELECT cust_first_name
    FROM customers
    WHERE INSTR(cust_first_name, ‘e’)IS NOT NULL AND
    SUBSTR(cust_first_name, 1, -2)=’a’;

  • SELECT cust_first_name
    FROM customers
    WHERE INSTR(cust_first_name, ‘e’)<>0 AND
    SUBSTR(cust_first_name, LENGTH(cust_first_name), -2)=’a’;

Question 11

Which statement is true regarding the INTERSECT operator?

Select an option, then click Submit answer.

  • The names of columns in all SELECT statements must be identical.

  • It ignores NULL values.

  • Reversing the order of the intersected tables alters the result.

  • The number of columns and data types must be identical for all SELECT statements in the query.

Question 12

You must write a query that prompts users for column names and conditions every time it is executed.

The user must be prompted only once for the table name.

Which statement achieves those objectives?

Select an option, then click Submit answer.

  • SELECT &col1, '&col2'
    FROM &table
    WHERE &&condition = '&cond';

  • SELECT &col1, &col2
    FROM "&table"
    WHERE &condition = &cond;

  • SELECT &col1, &col2
    FROM &&table
    WHERE &condition = &cond;

  • SELECT &col1, &col2
    FROM &&table
    WHERE &condition = &&cond