Oracle SQL DDL and Schema Objects Flashcards
6 cards from real Oracle SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Oracle SQL DDL and Schema Objects flashcards as text
Which Oracle SQL constraint ensures no two rows in a table have the same value in a column?
Answer: UNIQUE
A UNIQUE constraint prevents duplicate values in a column or combination of columns, but unlike PRIMARY KEY, it allows NULL values.
What does the CASCADE option do in DROP TABLE in Oracle SQL?
Answer: Drops the table and all dependent foreign key constraints
DROP TABLE ... CASCADE CONSTRAINTS removes the table along with all foreign key constraints that reference it.
Which Oracle SQL statement modifies the structure of an existing table?
Answer: ALTER TABLE
ALTER TABLE is used to add, modify, or drop columns and constraints in an existing table without recreating it.
Which Oracle SQL object automatically generates unique sequential numbers?
Answer: SEQUENCE
A SEQUENCE is a database object that generates unique integer values, commonly used as surrogate primary keys.
What is the purpose of a DATABASE LINK in Oracle SQL?
Answer: Allows queries to access objects in a remote Oracle database
A database link (DBLINK) enables Oracle to connect to and query objects in another Oracle database as if they were local.
Which Oracle SQL statement removes a view from the database?
Answer: DROP VIEW
DROP VIEW removes the view definition from the data dictionary; the underlying base tables are not affected.