GoConqr has a new look! Let us know what you think.

Quiz

Oracle Crusher

Brandon Gagon 17 questions

Take the quiz

Questions in this quiz (17)

  1. 1A view and a synonym are created as follows:

    create view dept_v as select * from dept;
    create synonym dept_s for dept_v;

    Subsequently the table DEPT is dropped. What will happen if you query the synonym DEPT_S?
    1. AThere will not be an error if you first recompile the view with the command ALTER VIEW DEPT_V COMPILE FORCE;
    2. BThere will be an error because the view will be invalid
    3. CThere will be an error because the view will be dropped implicitly when the table was dropped.
    4. DThere will not be an error because the synonym addresses the view, which still exists, but there will be no rows returned
    5. EThere will be an error because the synonym will be invalid
  2. 2Which two statements are true regarding the DELETE and TRUNCATE commands?
    1. ADELETE can be used to remove only rows from multiple tables at a time
    2. BDELETE can be used to remove only rows from only one table at a time
    3. CDELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint having ON DELETE rule
    4. DDELETE can be used to remove data from specific columns as well as complete rows
    5. EDELETE can be used only on a table that is a parent of a referential integrity constraint
  3. 3Which actions are allowed on a table that is marked as read-only?
    1. ADropping a table
    2. BTruncating a table
    3. CInserting new data
    4. DDropping a constraint
    5. EDropping an index
  4. 4User JOHN updates some rows but does not commit the changes. User ROOPESH queries the row that JOHN updated.

    Which of the following statements is true?
    1. AROOPESH will see the state of the data as it was when JOHN last created a SAVEPOINT.
    2. BROOPESH will be able to see the new values, but only if he logs in as JOHN.
    3. CROOPESH will not be able to see the rows because they will be locked.
    4. DROOPESH will see the old versions of the rows
  5. 5The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?
    1. AGRANT select ON dept
      TO ALL_USERS
    2. BGRANT QUERY ON dept
      TO ALL_USERS
    3. CGRANT select ON dept
      TO ALL
    4. DGRANT select ON dept
      TO PUBLIC
  6. 6Which comparison operator cannot be used with multiple-row subqueries?
    1. AAll the above can be used
    2. BNOT IN
    3. CANY
    4. DALL
    5. EIN
  7. 7SELECT COUNT(DISTINCT SUBSTR(first_name, 1,1))
    FROM employees;
    1. AA single-row function nested inside a group function is now allowed
    2. BThe GROUP BY clause is required to successfully run this query
    3. CThe query will execute successfully without any modifications
    4. DRemoving the DISTINCT qualifier will fix the error in the query
  8. 8Which two statements are true regarding single row functions?
    (Choose two.)

    1. AThey accept only a single argument
    2. BThey can be nested only to two levels
    3. CThey can return a data type value different from the one that is referenced
    4. DArguments can only be column values or constant
    5. EThey always return a single result row for every row of a queried table
  9. 9View the Exhibit and examine the structure of the PRODUCTS table. You want to display only those product names with their list prices where the list price is at least double the minimum price.

    The report should start with the product name having the maximum list price satisfying this condition.

    Evaluate the following SQL statement:

    SQL>SELECT prod_name, prod_list_price
    FROM products
    WHERE prod_list_price >= 2 * prod_min_price

    Which ORDER BY clauses can be added to the above SQL statement to get the correct output?
    (Choose all that apply.)

    Table PRODUCTS
    prod_id NUMBER(6) NOT NULL
    prod_name VARCHAR2(50) NOT NULL
    prod_list_price NUMBER(8,2) NOT NULL
    1. AORDER BY prod_name DESC, prod_list_price DESC;
    2. BORDER BY prod_list_price DESC, prod_name;
    3. CORDER BY prod_name, (2*prod_min_price)DESC;
    4. DORDER BY (2*prod_min_price)DESC, prod_name;
    5. EORDER BY prod_list_price DESC, prod_name DESC;
  10. 10Consider the following three SQL statements. Choose the most appropriate option.

    1. DELETE FROM CITY WHERE CNT_CODE = 1;
    2. DELETE CITY WHERE CNT_CODE = 1;
    3. DELETE (SELECT * FROM CITY WHERE CNT_CODE = 1);
    1. AStatements 1 and 2 will produce the same result; statement 3 will produce a different result.
    2. BStatements 1, 2, and 3 will produce different results.
    3. CStatements 1 and 2 will produce the same result; statement 3 will error out.
    4. DStatements 1, 2, and 3 will produce the same result.

Information

Description
Quiz on Oracle Crusher, created by Brandon Gagon on 19/02/2019.
Language
English
Views
3
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?