Oracle: Modifying Data & Multiple Databases MCQs

56 MCQs  (Page 3 of 6)

What is the purpose of CREATE SYNONYM emp_r FOR emp@remote_db;?
To access the remote table without typing the link name
To copy the table locally
To lock the remote table
To encrypt the link
What does the MERGE statement do?
Joins two databases together
Merges two tablespaces
Deletes duplicate tables
Inserts new rows or updates existing rows in a single statement
In a MERGE statement, which clause handles rows that already exist?
WHEN FOUND THEN INSERT
ON DUPLICATE KEY UPDATE
WHEN MATCHED THEN UPDATE
IF EXISTS THEN UPDATE
Which statement copies rows from one table to another existing table?
COPY t1 TO t2;
MOVE t1 INTO t2;
UPDATE t2 FROM t1;
INSERT INTO t2 SELECT * FROM t1;
What does CREATE TABLE new_emp AS SELECT * FROM emp; do?
Creates a new table with the structure and data of the query
Creates a view
Creates only an empty structure
Renames EMP
Which statement correctly deletes the employee with ID 5?
DELETE emp WHERE id = 5 ROWS;
DELETE FROM emp WHERE id = 5;
REMOVE FROM emp WHERE id = 5;
DROP ROW FROM emp WHERE id = 5;
Which statement correctly updates a salary?
UPDATE emp SET salary = 5000 WHERE id = 5;
UPDATE emp VALUES salary = 5000 WHERE id = 5;
MODIFY emp SET salary = 5000 WHERE id = 5;
UPDATE emp TO salary = 5000 WHERE id = 5;