AMP

Chapter 12: Structured Query Language (SQL) — Online MCQ Test

COMPUTER SCIENCE · CLASS 12th · Tamil Nadu State Board
Practice Chapter 12: Structured Query Language (SQL) with a free chapter-wise online MCQ test. This chapter covers: Focusing on database operations this chapter introduces SQL syntax and commands. It covers data definition data manipulation and data control language statements for creating table.... AI-generated questions from basic to board-exam level, with instant results and explanations.

Start Exam on Full Site →

Chapter 12: Structured Query Language (SQL) — Important Questions & Answers

Which SQL command is used to create a new table in a database?
  • A. INSERT
  • B. CREATE
  • C. SELECT
  • D. UPDATE
Answer: B. CREATE
CREATE is a DDL command used to define and create database objects like tables.
Which of the following is a Data Manipulation Language (DML) command?
  • A. DROP
  • B. ALTER
  • C. INSERT
  • D. GRANT
Answer: C. INSERT
INSERT is a DML command used to add new records into a table.
Which SQL command is used to change the structure of an existing table?
  • A. ALTER
  • B. INSERT
  • C. SELECT
  • D. COMMIT
Answer: A. ALTER
ALTER is a DDL command used to modify the structure of an existing table.
What will be the result of the SQL statement: SELECT * FROM STUDENT WHERE MARKS > 80?
  • A. All students whose marks are 80 or less
  • B. Only the student with exactly 80 marks
  • C. All students whose marks are greater than 80
  • D. All students in the table
Answer: C. All students whose marks are greater than 80
The WHERE condition filters and returns only those rows where MARKS is greater than 80.
Which SQL statement is used to give a user permission to insert records into a table?
  • A. GRANT INSERT ON table_name TO user_name;
  • B. REVOKE INSERT ON table_name FROM user_name;
  • C. CREATE INSERT ON table_name TO user_name;
  • D. ALTER INSERT ON table_name TO user_name;
Answer: A. GRANT INSERT ON table_name TO user_name;
GRANT is used to assign privileges, and INSERT privilege allows adding records into a table.