Empowering Students with AI-Powered Assessments & Intelligent Learning
Chapter Exam

Chapter-9 Structured Query Language (SQL) — Online MCQ Test

COMPUTER SCIENCE · Grade 12 · CBSE(NCERT)

Practice Chapter-9 Structured Query Language (SQL) with a free chapter-wise online MCQ test for CBSE(NCERT) Grade 12 COMPUTER SCIENCE. This chapter covers: DDL - DML - CREATE - INSERT - SELECT - UPDATE - DELETE - GROUP BY - HAVING - table joins. AI-generated questions from basic to board-exam level, with instant results and explanations.

10
Questions
20m
Time Limit
3
Attempts Left
  • 10 random questions from this chapter (mixed difficulty)
  • Questions you've seen before won't repeat until the pool resets
  • You have 20 minutes — exam auto-submits when time is up
  • Maximum 3 attempts per chapter
  • Results and explanations shown immediately after submission
Login to Start This Exam →

New here? Register free — includes 3 free chapter exams.

Chapter-9 Structured Query Language (SQL) — Important Questions & Answers (FAQ)

Frequently asked questions from CBSE(NCERT) Grade 12 COMPUTER SCIENCE — Chapter-9 Structured Query Language (SQL), with answers and explanations. These are sample questions; the exam has its own separate question set.

Which of the following is a DDL (Data Definition Language) command?
  • A. CREATE ✓
  • B. INSERT
  • C. UPDATE
  • D. SELECT
Answer: A. CREATE
CREATE is a DDL command used to create database objects like tables. INSERT, UPDATE, and SELECT are DML or query commands.
What does DML stand for in SQL?
  • A. Data Markup Language
  • B. Data Modification Language
  • C. Data Manipulation Language ✓
  • D. Database Management Logic
Answer: C. Data Manipulation Language
DML (Data Manipulation Language) includes commands like INSERT, UPDATE, DELETE, and SELECT for manipulating data in tables.
Consider the query: SELECT name, age FROM students WHERE age > 18 ORDER BY name;. What will this query return?
  • A. Names and ages of students aged 18 or less, sorted by name
  • B. Names and ages of students older than 18, sorted by name ✓
  • C. Names of students older than 18, sorted by age
  • D. All student records sorted by age
Answer: B. Names and ages of students older than 18, sorted by name
The query filters students with age > 18 using WHERE, selects name and age columns, and orders results by name alphabetically.
Analyze this query: SELECT name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees);. What does it return?
  • A. All employees and their salaries
  • B. Employees with salary above the average salary of all employees ✓
  • C. Employees with the maximum salary
  • D. Average salary grouped by name
Answer: B. Employees with salary above the average salary of all employees
This uses a subquery to calculate average salary, then returns only employees whose salary exceeds this average.
What is the output of: SELECT AVG(CAST(salary AS FLOAT)) FROM employees; if it contains non-numeric salary values?
  • A. Average of numeric values only, ignoring non-numeric entries ✓
  • B. An error because of type mismatch
  • C. Zero as the average
  • D. The query ignores the CAST and calculates normally
Answer: A. Average of numeric values only, ignoring non-numeric entries
CAST converts values to FLOAT type for calculation. Non-numeric values that cannot be cast are typically ignored in aggregate functions, calculating the average of valid numeric values.

Choose Your Plan & Start Practising

All plans cover every subject and chapter of your registered grade.

Free
₹0
3 exams · 1 year
Start Free →
Active
₹350
12 exams · 1 year
Get Active →
Pro
₹899
Unlimited exams · 1 year
Get Pro →

Compare all plans in detail →