Introduction to SQL Quiz - CBSE Class 10 Computer Science
Free practice quiz: Introduction to SQL (CBSE Class 10 Computer Science). 20 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 20 questions freeSample questions
What is SQL primarily used for?
- Data analysis
- Web development
- Database management
- Graphic designing
Show answer
Answer: C. Database management
SQL is primarily used for accessing and managing databases.
How can you ensure the uniqueness of a column in a table?
- PRIMARY KEY
- FOREIGN KEY
- CHECK
- DEFAULT
Show answer
Answer: A. PRIMARY KEY
A PRIMARY KEY constraint uniquely identifies each record in a database table.
How can you remove all records from a table without deleting the table?
- DELETE
- TRUNCATE
- DROP
- REMOVE
Show answer
Answer: B. TRUNCATE
The TRUNCATE command deletes all rows in a table without logging individual row deletions.
Which command will remove a table from a database?
- DELETE TABLE
- CLEAR
- DROP TABLE
- TRUNCATE TABLE
Show answer
Answer: C. DROP TABLE
DROP TABLE command removes a table and all its rows from the database.
In SQL, what purpose does the HAVING clause serve?
- It modifies the SELECT statement
- It specifies the sorting order
- It filters records after aggregation
- It changes data types
Show answer
Answer: C. It filters records after aggregation
HAVING clause is used to filter records that work on summarized group results, similar to WHERE but for aggregated data.