General SQL I
1.
What does SQL stand for?
Sequential Question Language
Sequential Query Language
Structured Question Language
Structured Query Language
2.
Which SQL clause is used to filter the result set based on a specified condition?
FROM
WHERE
SELECT
GROUP BY
3.
What is the purpose of the GROUP BY clause in SQL?
To order the result set
To group rows based on a specified column or columns
To filter the result set
To perform arithmetic operations
4.
Which SQL statement is used to insert new data into a database?
SELECT
UPDATE
DELETE FROM
INSERT INTO
5.
In SQL, what does the term 'JOIN' refer to?
Filtering the result set based on a condition
Sorting the result set in ascending order
Combining rows from two or more tables based on a related column
Grouping the result set based on a column
6.
What is the purpose of the ORDER BY clause in SQL?
To sort the result set in ascending or descending order
To filter the result set
To group the result set
To perform arithmetic operations
7.
Which SQL statement is used to update existing data in a database?
UPDATE
INSERT INTO
DELETE FROM
SELECT
8.
What is the primary key in a relational database?
A column that contains only numeric data
A unique identifier for a record in a table
The first column in a table
A column that allows NULL values
9.
Which SQL function is used to find the total number of rows in a table?
SUM()
COUNT()
AVG()
MAX()
10.
What is the purpose of the HAVING clause in SQL?
To order the result set
To filter the result set based on a condition after the GROUP BY clause
To perform arithmetic operations
To group the result set based on a column
11.
Which SQL statement is used to delete data from a database?
UPDATE
INSERT INTO
DELETE FROM
SELECT
12.
In SQL, what does the term 'DISTINCT' mean?
Retrieve unique values in a specified column or columns
Sort the result set in descending order
Filter the result set based on a condition
Perform arithmetic operations on the result set
13.
What is the purpose of the BETWEEN operator in SQL?
To group the result set based on a column
To perform arithmetic operations
To order the result set
To filter the result set based on a range of values
14.
Which SQL data type is used to store alphanumeric characters of varying lengths?
DATE
INT
VARCHAR
FLOAT
15.
What is the purpose of the UNION operator in SQL?
To perform arithmetic operations
To filter the result set based on a condition
To group the result set based on a column
To combine the result sets of two or more SELECT statements
16.
Which SQL statement is used to retrieve data from one or more tables?
INSERT INTO
SELECT
UPDATE
DELETE FROM
17.
What does the term 'NULL' represent in SQL?
An empty string
Zero
A missing or unknown value
The absence of a primary key
18.
Which SQL function is used to find the maximum value in a column?
AVG()
MIN()
SUM()
MAX()
19.
What is the purpose of the LIMIT clause in SQL?
To order the result set
To filter the result set based on a condition
To limit the number of rows returned in the result set
To group the result set based on a column
20.
Which SQL operator is used to combine multiple conditions in a WHERE clause?
OR
AND
NOT
LIKE