Oracle: Modifying Data & Multiple Databases MCQs

56 MCQs  (Page 1 of 6)

Practice Oracle: Modifying Data & Multiple Databases MCQs with correct answers and explanations. Browse subtopics below or start a practice quiz.

Which statement correctly inserts a row into the EMP table?
INSERT INTO emp (id, name) VALUES (1, 'Ali');
INSERT emp VALUES INTO (1, 'Ali');
ADD INTO emp (id, name) VALUES (1, 'Ali');
INSERT INTO emp SET id = 1, name = 'Ali';
What happens if an UPDATE statement has no WHERE clause?
All rows in the table are updated
Only the first row is updated
The statement fails
No rows are updated
What does COMMIT do?
Undoes all changes
Locks the table permanently
Makes all changes of the current transaction permanent
Creates a savepoint
What does ROLLBACK do?
Commits all changes
Deletes the table
Undoes uncommitted changes of the current transaction
Reverses already committed work
What is the purpose of SAVEPOINT?
To save the table to disk permanently
To mark a point within a transaction to which you can partially roll back
To create a backup
To lock a row
Which action implicitly commits the current transaction in Oracle?
Executing a SELECT statement
Executing an INSERT statement
Creating a SAVEPOINT
Executing a DDL statement such as CREATE TABLE
What does SELECT ... FOR UPDATE do?
Updates the rows automatically
Deletes the rows
Locks the selected rows until the transaction ends
Copies the rows to a new table