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
-
Which statement is used to remove rows from a table?
a. DROP.
b. REMOVE.
c. DELETE.
d. MERGE.
Question 2
-
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
-
Which DML Statement begins a transaction?
a. INSERT.
b. CREATE.
c. SELECT.
d. DROP.
Question 4
-
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
-
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
-
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
-
When DML operations are performed, rows are locked in the table. Such rows cannot be read by another session.
True
False
Question 8
-
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
-
True or False. When a ROLLBACK TO SAVEPOINT is executed, all locks held by the transaction is released.
True
False
Question 10
-
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started