WorksheetsSQL Quiz
Total questions: 40
Worksheet time: 55mins
What does SQL stand for?
Simple Query Language
Structured Query Language
Standard Query Language
Sequential Query Logic
In which decade was SQL first developed by IBM researchers?
1960s
1970s
1980s
1990s
Which type of database does SQL primarily interact with?
Hierarchical Database
Flat File Database
Relational Database
NoSQL Database
Which SQL command is used to retrieve data from a table?
FETCH
GET
EXTRACT
SELECT
Which category of SQL commands deals with defining or modifying the structure of the database?
DML
DDL
DQL
DCL
Which of the following is an example of a DML (Data Manipulation Language) command?
CREATE
ALTER
UPDATE
DROP
What character is used to terminate a standard SQL statement?
Colon (:)
Period (.)
Semicolon (;)
Comma (,)
To filter results in a SELECT statement, which clause is used?
WHERE
HAVING
GROUP BY
ORDER BY
Which command is used to add new rows of data into a table?
ADD
INSERT INTO
NEW ROW
UPDATE
The unique identifier for each record in a table is called the:
Foreign Key
Secondary Key
Primary Key
Master Key
Which clause is used to sort the result-set in ascending or descending order?
SORT BY
ORDER BY
ALIGN
SEQUENCE
What does 'DCL' stand for in SQL?
Data Central Language
Data Control Language
Database Control Logic
Data Command List
Which aggregate function is used to find the total number of rows in a table?
SUM()
TOTAL()
COUNT()
ADD()
In SQL syntax, keywords like SELECT and FROM are:
Case-sensitive
Case-insensitive
Always lowercase
Always bolded
Which command is used to remove a column or a whole table structure from the database?
DELETE
REMOVE
DROP
TRUNCATE
True or False: SQL is a procedural language.
True
False
True or False: Tables in a relational database are also known as 'relations.'
True
False
True or False: The GROUP BY clause is typically used with aggregate functions.
True
False
True or False: CHAR is a variable-length data type, while VARCHAR is fixed-length.
True
False
True or False: Data integrity rules in SQL help prevent duplicate or inconsistent data.
True
False
True or False: The DELETE command removes the table structure from the database.
True
False
True or False: A relational database stores data in a flat-file format.
True
False
True or False: SQL can be used to set permissions for different users (DCL).
True
False
True or False: In SQL, 1 usually represents TRUE and 0 represents FALSE.
True
False
True or False: SQL is platform-dependent and only works on Windows systems.
True
False
What is the term for a single entry (row) in a table?
Which specific clause is used to filter groups of data after they have been aggregated?
What is the name for the number of attributes (columns) in a relation?
Which SQL command is used to save all changes made during a transaction?
What type of 'Join' returns all records when there is a match in either the left or right table?
Identify the command category for GRANT and REVOKE.
What keyword is used in a SELECT statement to return only unique (non-duplicate) values?
Which aggregate function returns the average value of a numeric column?
What term describes the number of tuples (rows) in a relation?
Which operator is used for pattern matching (e.g., finding names starting with 'A')?
Identify the DDL command used to change the structure of an existing table.
What does 'TCL' stand for in the context of SQL commands?
Which data type would you use for a column storing large whole numbers?
What is the name of the operation used to combine data from two tables based on a common column?
Fill in the blank: The (a) command is used to undo changes that have not yet been saved to the database.
