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
What is a synonym in Oracle SQL?
Answer: An alternate name for a database object
A synonym is an alternative name for a database object (table, view, sequence, etc.) that simplifies access and hides the actual object name or owner.
Which Oracle SQL index type is best suited for columns with very few distinct values like gender (M/F)?
Answer: Bitmap index
Bitmap indexes are highly efficient for low-cardinality columns because they store a bit for each distinct value, enabling fast logical operations.
What does CREATE TABLE AS SELECT do in Oracle SQL?
Answer: Creates a new table with structure and data copied from a query result
CREATE TABLE ... AS SELECT (CTAS) creates a new table and populates it with the result set of the SELECT query.
Which Oracle SQL constraint ensures a column's value meets a specific condition?
Answer: CHECK
A CHECK constraint validates that column values satisfy a specified Boolean condition, such as salary > 0.
What is the purpose of the NOCACHE option when creating an Oracle SEQUENCE?
Answer: Prevents the sequence from being cached in memory, issuing numbers one at a time
NOCACHE forces Oracle to generate each sequence number with a separate database operation, avoiding gaps but reducing performance.
Which privilege is required to create a table in another user's schema in Oracle SQL?
Answer: CREATE ANY TABLE
CREATE ANY TABLE privilege allows a user to create tables in any schema, not just their own.