General Concepts Flashcards
7 cards from real SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 General Concepts flashcards as text
What is a subquery in SQL?
Answer: A query nested inside another query
A subquery is a query embedded within another SQL statement.
Which operator combines results of two SELECT statements and removes duplicates?
Answer: UNION
UNION combines result sets and removes duplicate rows.
What does a VIEW represent in SQL?
Answer: A virtual table based on a query
A view is a saved query that acts like a virtual table.
Which DDL command creates a new table?
Answer: CREATE TABLE
CREATE TABLE defines a new table and its columns.
What does the COALESCE function return?
Answer: The first non-NULL value in a list
COALESCE returns the first non-NULL value among its arguments.
Which constraint ensures a column cannot contain NULL values?
Answer: NOT NULL
The NOT NULL constraint requires a column to always have a value.
What is the result of dividing by zero in most SQL implementations?
Answer: An error or NULL
Most SQL databases raise an error or return NULL when dividing by zero.