Introduction to SQL Questions

Practice Introduction to SQL MCQs with answers and explanations. Page 3 of 4.

Category
Database
Topic
Introduction to SQL
Page
3 / 4
Mode
Practice

Questions

Open any question to view the answer and explanation.

SQL pattern matching: Choose the accurate statement. “In SQL-92, the wildcard asterisk (*) represents any sequence of characters.”
Open
View answer
Indexing fundamentals: Assess this claim. “Indexes can usually be created for both primary keys and secondary (non-primary) keys.”
Open
View answer
Aggregate results: Clarify the definition. “Scalar aggregates are multiple values returned from an SQL query that includes an aggregate function.”
Open
View answer
SQL command categories: Decide whether the statement is accurate. “Data Manipulation Language (DML) commands are used to define a database, including creating, altering, and dropping tables and establishing constraints.”
Open
View answer
Using DISTINCT and ALL: Assess the limitation. “DISTINCT and its counterpart ALL can be used more than once in a single SELECT statement.”
Open
View answer
Purpose of SELECT DISTINCT: Choose the correct interpretation. “SELECT DISTINCT is used when a user wishes to see duplicate rows in a query result.”
Open
View answer
COUNT with a non-grouped column: Analyze the statement. “The SQL: SELECT Name, COUNT() FROM NAME_TABLE; counts the number of name rows and displays this total in a table with a single row and a single column.”
Open
View answer
Removing duplicate rows: Evaluate the necessity. “The qualifier DISTINCT must be used in an SQL statement when we want to eliminate duplicate rows.”
Open
View answer
Subqueries vs. joins: Judge the generality of this claim. “There is an equivalent join expression that can be substituted for all subquery expressions.”
Open
View answer
In SQL database practice, is there a standard ADD command used to insert one row or to add multiple rows from a query result, or is row insertion performed by another statement (such as INSERT and INSERT ... SELECT)?
Open
View answer
Result sets in SQL: is the output of every SELECT query a tabular relation (a table-like result set) that can be further queried?
Open
View answer
Sorting query results: can SQL ORDER BY sort by multiple columns (primary key, tie-breakers), or is it limited to only one column?
Open
View answer
Understanding GROUP BY: does the SQL GROUP BY clause group together rows that share the same value(s) for the specified column(s) so that aggregations apply per group?
Open
View answer
Can ORDER BY be used together with SELECT to control the presentation order of the rows returned by a query?
Open
View answer
Indexes and storage/maintenance: does each index consume extra disk space and incur overhead during INSERT/UPDATE/DELETE operations when the indexed value changes?
Open
View answer
Specifying ranges in SQL predicates: can you establish a range using comparison operators like < and > (and <=, >=), or must a special operator be used?
Open
View answer
Column aliases and readability: does SQL provide the AS keyword to assign meaningful output names to expressions and built-in function results in a SELECT list?
Open
View answer
WHERE clause expressiveness: can a WHERE condition reference multiple values/columns and combine predicates (using AND/OR/IN), or is it restricted to a single value?
Open
View answer
Complex boolean logic: when combining three or more AND/OR conditions in SQL, is it usually easier to switch to NOT and NOT IN instead of using parentheses and explicit logic?
Open
View answer
In SQL, can the BETWEEN keyword be used in a WHERE clause to select rows whose column values fall within an inclusive range (lower and upper bounds included)?
Open
View answer

Practice smarter

Solve a few questions daily and revisit weak topics regularly to improve accuracy.