NEW
Font size
WorksheetsBasics of SQL | 10 Grade ICT | Unit 2(DB)
Total questions: 10
Worksheet time: 3mins
What does the SELECT command do in SQL?
Creates a new table in the database.
Updates data in the database.
Retrieves data from the database.
Deletes data from the database.
What SQL command would you use to update existing records in a table?
DELETE FROM table_name WHERE condition;
INSERT INTO table_name VALUES (value1, value2);
SELECT * FROM table_name WHERE condition;
UPDATE table_name SET column_name = new_value WHERE condition;
What is the purpose of the ORDER BY clause in SQL?
Combining data from multiple tables into a single result.
Grouping query results by one or more columns.
Sorting query results by one or more columns.
Filtering query results based on specified criteria.
If you want to change the structure of an existing table, which command would you use?
CREATE TABLE
DROP TABLE
UPDATE TABLE
ALTER TABLE
Which SQL command deletes an entire table from the database?
DROP TABLE table_name;
CLEAR TABLE table_name;
DELETE TABLE table_name;
REMOVE TABLE table_name;
What does the INSERT INTO command do in SQL?
Deletes rows from the database table.
Adds new rows to the database table.
Creates a new table in the database.
Modifies existing rows in the database table.
What operator is used to filter records in SQL?
SELECT
ORDER BY
FILTER
WHERE
What data type is used to store text information in SQL?
INTEGER, FLOAT, BOOLEAN
DATE, TIME, TIMESTAMP
VARCHAR, CHAR, TEXT
BLOB, XML, JSON
Which operator is used to delete records from a table?
DELETE
CLEAR
REMOVE
DROP
What does the CREATE TABLE command do in SQL?
Copies data from one table to another.
Creates a new table in the database.
Modifies the structure of an existing table.
Deletes a table from the database.
