Question: Question 1 Which statement is used to remove rows from a table? a. DROP. b. REMOVE. c. DELETE. d. MERGE. Question 2 Find the problem

Question 1

  1. Which statement is used to remove rows from a table?

    a.

    DROP.

    b.

    REMOVE.

    c.

    DELETE.

    d.

    MERGE.

Question 2

  1. Find the problem in the following SQL. INSERT INTO NEWEMP (ENAME, SALARY) VALUES (SELECT FIRST_NAME, SALARY FROM EMPLOYEES WHERE HIRE_DATE > SYSDATE 30) When inserting from another table using a subquery, the _ clause should not be included.

Question 3

  1. Which DML Statement begins a transaction?

    a.

    INSERT.

    b.

    CREATE.

    c.

    SELECT.

    d.

    DROP.

Question 4

  1. What is wrong with the following SQL? "UPDATE EMPLOYEES E SET (COMMISSION_PCT, SALARY) = (SELECT NC, NS FROM NEW_SALARY NE WHERE E.EMPLOYEE_ID = NE.EMPLOYEE_ID)"

    a.

    Subquery has the same number of columns selected as in the SET clause.

    b.

    If an employee record is not in NEW_SALARY table, his/her updated salary will be NULL.

    c.

    It is not a valid syntax to have two columns in the SET clause together.

    d.

    It is not a valid syntax to use a subquery with more than one column in the SELECT clause.

Question 5

  1. What is wrong with the following SQL? "UPDATE ACCOUNTS WHERE ACCOUNT_NO = 1234 SET ACCOUNT_NO = 3456"

    a.

    Not a valid SQL, syntax error.

    b.

    Cannot use the same column in the WHERE and SET clauses.

    c.

    Column name should be qualified with table name.

    d.

    No error in this statement.

Question 6

  1. True or False. The following statement will error out: "UPDATE EMPLOYEES SET HIRE_DATE = TRUNC(HIRE_DATE) AND START_DATE = TRUNC(START_DATE)"

    True

    False

Question 7

  1. When DML operations are performed, rows are locked in the table. Such rows cannot be read by another session.

    True

    False

Question 8

  1. Choose the correct statement.

    a.

    When insert operation is performed, all rows in the table are locked.

    b.

    When update operation is performed, only affected rows are locked.

    c.

    When delete operation is performed, all rows in the table are locked.

    d.

    All of the above are true.

Question 9

  1. True or False. When a ROLLBACK TO SAVEPOINT is executed, all locks held by the transaction is released.

    True

    False

Question 10

  1. Which statement releases all locks held by the transaction?

    a.

    INSERT.

    b.

    TRUNCATE.

    c.

    DELETE.

    d.

    MERGE.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!