Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

CBSE
Class 12
Computer Science
Computer Science
Structured Query Language (SQL
Question Bank

Question Bank - Structured Que...

Practice Hub

Question Bank: Structured Query Language (SQL

This chapter introduces Structured Query Language (SQL), essential for managing databases effectively. It covers creation, manipulation, and retrieval of data in databases, highlighting its significance in computer science.

Structured practice

Question Bank - Structured Query Language (SQL

Q1.

What does SQL stand for?

Single Answer MCQ
Q-00095164
View explanation
Q2.

Which of the following is a feature of SQL?

Single Answer MCQ
Q-00095165
View explanation
Q3.

What type of database management system is MySQL?

Single Answer MCQ
Q-00095166
View explanation
Q4.

What is a primary function of SQL?

Single Answer MCQ
Q-00095167
View explanation
Q5.

Which SQL statement is used to retrieve data from a database?

Single Answer MCQ
Q-00095168
View explanation
Q6.

In SQL, which keyword is used to add a new record to a table?

Single Answer MCQ
Q-00095169
View explanation
Q7.

What advantage does SQL provide in data retrieval compared to traditional programming?

Single Answer MCQ
Q-00095170
View explanation
Q8.

What is the effect of the command 'DELETE FROM table_name WHERE condition'?

Single Answer MCQ
Q-00095171
View explanation
Q9.

Which SQL statement is used to modify existing data?

Single Answer MCQ
Q-00095172
View explanation
Q10.

What does the SQL command 'CREATE TABLE' do?

Single Answer MCQ
Q-00095173
View explanation
Q11.

Which of the following describes SQL statements?

Single Answer MCQ
Q-00095174
View explanation
Q12.

Which clause is used to group rows with the same values in SQL?

Single Answer MCQ
Q-00095175
View explanation
Q13.

What is a common application of SQL?

Single Answer MCQ
Q-00095176
View explanation
Q14.

Which term describes the rules that affect the validity of data in SQL?

Single Answer MCQ
Q-00095177
View explanation
Q15.

When using SQL, what does 'DDL' stand for?

Single Answer MCQ
Q-00095178
View explanation
Q16.

What is the correct SQL command to create a table named STUDENT?

Single Answer MCQ
Q-00095179
View explanation
Q17.

Which SQL statement is used to retrieve all records from a table?

Single Answer MCQ
Q-00095180
View explanation
Q18.

What does the SQL command 'DESCRIBE STUDENT;' do?

Single Answer MCQ
Q-00095181
View explanation
Q19.

What is the purpose of the WHERE clause in SQL?

Single Answer MCQ
Q-00095182
View explanation
Q20.

How would you retrieve the average price of cars modeled 'LXI' from the inventory?

Single Answer MCQ
Q-00095183
View explanation
Q21.

What is the result of the SQL command 'SELECT COUNT(DISTINCT Model) FROM INVENTORY;'?

Single Answer MCQ
Q-00095184
View explanation
Q22.

In SQL, what is a primary key?

Single Answer MCQ
Q-00095185
View explanation
Q23.

Which of the following SQL statements will group rows with the same values in a specified column?

Single Answer MCQ
Q-00095186
View explanation
Q24.

What SQL clause is used to filter records after grouping?

Single Answer MCQ
Q-00095187
View explanation
Q25.

Which is a valid SQL statement for adding a new column named 'Email' of type VARCHAR to an existing table named 'EMPLOYEE'?

Single Answer MCQ
Q-00095188
View explanation
Q26.

What will happen if you attempt to insert a record into a table with a PRIMARY KEY that already exists?

Single Answer MCQ
Q-00095189
View explanation
Q27.

When would you use the command 'SELECT SName, SDateofBirth FROM STUDENT WHERE RollNumber = 1;'?

Single Answer MCQ
Q-00095190
View explanation
Q28.

What is the result of executing 'SELECT * FROM EMPLOYEE WHERE DeptId IS NULL;'?

Single Answer MCQ
Q-00095191
View explanation
Q29.

Which SQL command is used to remove all records from a table without deleting the table itself?

Single Answer MCQ
Q-00095192
View explanation
Q30.

When using the GROUP BY clause, what does the HAVING clause accomplish?

Single Answer MCQ
Q-00095193
View explanation
Q31.

Which SQL statement is used to create a new database?

Single Answer MCQ
Q-00095194
View explanation
Q32.

What does the NOT NULL constraint ensure?

Single Answer MCQ
Q-00095195
View explanation
Q33.

Which SQL command is used to modify an existing table?

Single Answer MCQ
Q-00095196
View explanation
Q34.

Which of the following ensures that all values in a column are distinct?

Single Answer MCQ
Q-00095197
View explanation
Q35.

What is the purpose of the PRIMARY KEY constraint?

Single Answer MCQ
Q-00095198
View explanation
Q36.

Which two constraints must be combined to create a PRIMARY KEY?

Single Answer MCQ
Q-00095199
View explanation
Q37.

Which datatype is used for text strings in MySQL?

Single Answer MCQ
Q-00095200
View explanation
Q38.

What does the CREATE TABLE statement do in SQL?

Single Answer MCQ
Q-00095201
View explanation
Q39.

Which of the following SQL commands is correct to delete a table?

Single Answer MCQ
Q-00095202
View explanation
Q40.

In SQL, what is the purpose of the FOREIGN KEY constraint?

Single Answer MCQ
Q-00095203
View explanation
Q41.

Which of the following data types would best suit an integer value?

Single Answer MCQ
Q-00095204
View explanation
Q42.

What is the main function of the DEFAULT constraint in SQL?

Single Answer MCQ
Q-00095205
View explanation
Q43.

What does the command ALTER TABLE table_name ADD column_name datatype do?

Single Answer MCQ
Q-00095206
View explanation
Q44.

If a PRIMARY KEY is defined on a column, which of the following is true?

Single Answer MCQ
Q-00095207
View explanation
Q45.

What does the INT data type represent in MySQL?

Single Answer MCQ
Q-00095208
View explanation
Q46.

Which of the following constraints ensures that a column cannot have NULL values?

Single Answer MCQ
Q-00095209
View explanation
Q47.

What is the maximum storage length for a VARCHAR data type in MySQL?

Single Answer MCQ
Q-00095210
View explanation
Q48.

Which of the following is true about the CHAR data type?

Single Answer MCQ
Q-00095211
View explanation
Q49.

What constraint can be used to ensure all values in a column are distinct?

Single Answer MCQ
Q-00095212
View explanation
Q50.

What do the terms 'FOREIGN KEY' and 'PRIMARY KEY' signify in a relational database?

Single Answer MCQ
Q-00095213
View explanation
Q51.

Which MySQL data type is suitable for storing dates?

Single Answer MCQ
Q-00095214
View explanation
Q52.

What happens if a UNIQUE constraint is violated?

Single Answer MCQ
Q-00095215
View explanation
Q53.

In MySQL, what is the purpose of using a DEFAULT constraint?

Single Answer MCQ
Q-00095216
View explanation
Q54.

If an attribute is defined with a PRIMARY KEY and NOT NULL constraints, what does it imply?

Single Answer MCQ
Q-00095217
View explanation
Q55.

Which data type can store a number with decimals in MySQL?

Single Answer MCQ
Q-00095218
View explanation
Q56.

What storage requirement does the BIGINT data type have in MySQL?

Single Answer MCQ
Q-00095219
View explanation
Q57.

What is indicated by a column with a NOT NULL constraint?

Single Answer MCQ
Q-00095220
View explanation
Q58.

What will happen if you attempt to insert a duplicate value into a column defined with a UNIQUE constraint?

Single Answer MCQ
Q-00095221
View explanation
Q59.

Which command would you use to create a database in MySQL?

Single Answer MCQ
Q-00095222
View explanation
Q60.

Which constraint allows for linking records between two tables?

Single Answer MCQ
Q-00095223
View explanation
Q61.

What does a VARCHAR(n) declaration do?

Single Answer MCQ
Q-00095224
View explanation
Q62.

Which SQL command is used to add new records to a table?

Single Answer MCQ
Q-00095225
View explanation
Q63.

What does the DELETE statement do in SQL?

Single Answer MCQ
Q-00095226
View explanation
Q64.

What must be ensured before inserting a record with a foreign key?

Single Answer MCQ
Q-00095227
View explanation
Q65.

Which statement is correct regarding the INSERT INTO command?

Single Answer MCQ
Q-00095228
View explanation
Q66.

How is a table permanently removed in SQL?

Single Answer MCQ
Q-00095229
View explanation
Q67.

Which statement will update the GAddress of a guardian in the GUARDIAN table?

Single Answer MCQ
Q-00095230
View explanation
Q68.

In SQL, which clause is used to specify which records to retrieve?

Single Answer MCQ
Q-00095231
View explanation
Q69.

What will happen if you use the DELETE statement without a WHERE clause?

Single Answer MCQ
Q-00095232
View explanation
Q70.

Which command is used to change existing records in a table?

Single Answer MCQ
Q-00095233
View explanation
Q71.

What will the command 'SELECT * FROM GUARDIAN;' return?

Single Answer MCQ
Q-00095234
View explanation
Q72.

Which of the following statements is true regarding data manipulation in SQL?

Single Answer MCQ
Q-00095235
View explanation
Q73.

Which SQL command would you use to remove a specific record from the GUARDIAN table where GUID = '444444444444'?

Single Answer MCQ
Q-00095236
View explanation
Q74.

When using the UPDATE command, which clause is essential?

Single Answer MCQ
Q-00095237
View explanation
Q75.

What is the function of the GROUP BY clause in SQL?

Single Answer MCQ
Q-00095238
View explanation
Q76.

If a record with a unique constraint is attempted to be inserted with a duplicate value, what will happen?

Single Answer MCQ
Q-00095239
View explanation
Q77.

What is the purpose of the SELECT statement in SQL?

Single Answer MCQ
Q-00095240
View explanation
Q78.

Which SQL clause is used to filter records based on specific conditions?

Single Answer MCQ
Q-00095241
View explanation
Q79.

What will be the output of the following SQL query: SELECT * FROM Students WHERE RollNumber = 5?

Single Answer MCQ
Q-00095242
View explanation
Q80.

Which SQL keyword is used to sort the result set?

Single Answer MCQ
Q-00095243
View explanation
Q81.

What will the query 'SELECT SName FROM STUDENT WHERE SDateofBirth IS NULL;' return?

Single Answer MCQ
Q-00095244
View explanation
Q82.

Which of the following statements is true about SQL?

Single Answer MCQ
Q-00095245
View explanation
Q83.

What does the DISTINCT keyword do in a SQL query?

Single Answer MCQ
Q-00095246
View explanation
Q84.

What will happen if you run the query 'SELECT * FROM STUDENT LIMIT 10'?

Single Answer MCQ
Q-00095247
View explanation
Q85.

Which SQL statement correctly retrieves all columns from the 'Courses' table?

Single Answer MCQ
Q-00095248
View explanation
Q86.

In an SQL SELECT statement, which clause specifies the table to retrieve records from?

Single Answer MCQ
Q-00095249
View explanation
Q87.

If two students have the same RollNumber, what will happen when inserting a new student with that RollNumber?

Single Answer MCQ
Q-00095250
View explanation
Q88.

In SQL, what is the function of the GROUP BY clause?

Single Answer MCQ
Q-00095251
View explanation
Q89.

What SQL command is used to modify existing records in a table?

Single Answer MCQ
Q-00095252
View explanation
Q90.

Which SQL function can get the total number of records in a table?

Single Answer MCQ
Q-00095253
View explanation
Q91.

What type of SQL join returns all records from one table and only the matching records from the other?

Single Answer MCQ
Q-00095254
View explanation
Q92.

What is the main purpose of the POWER() function in SQL?

Single Answer MCQ
Q-00095255
View explanation
Q93.

Which of the following is a valid syntax for the ROUND() function?

Single Answer MCQ
Q-00095256
View explanation
Q94.

What does the MOD() function do in SQL?

Single Answer MCQ
Q-00095257
View explanation
Q95.

Which function would you use to find the minimum value in a column?

Single Answer MCQ
Q-00095258
View explanation
Q96.

If you want to calculate the average price of cars, which SQL function should you use?

Single Answer MCQ
Q-00095259
View explanation
Q97.

What type of function is COUNT() classified as?

Single Answer MCQ
Q-00095260
View explanation
Q98.

Which of the following types of functions can be used in a WHERE clause?

Single Answer MCQ
Q-00095261
View explanation
Q99.

What output does the function DAYNAME('2022-10-01') return?

Single Answer MCQ
Q-00095262
View explanation
Q100.

What is the main purpose of the GROUP BY clause in SQL?

Single Answer MCQ
Q-00095263
View explanation
Q101.

In SQL, which function would you use to combine string values?

Single Answer MCQ
Q-00095264
View explanation
Q102.

Which SQL query will correctly calculate the total sales grouped by each employee ID?

Single Answer MCQ
Q-00095265
View explanation
Q103.

Which SQL statement correctly retrieves the maximum price from the inventory?

Single Answer MCQ
Q-00095266
View explanation
Q104.

What happens when you use GROUP BY without an aggregate function in your SQL query?

Single Answer MCQ
Q-00095267
View explanation
Q105.

What does the function COUNT(*) specifically do?

Single Answer MCQ
Q-00095268
View explanation
Q106.

In which scenario would you most likely use the HAVING clause with GROUP BY?

Single Answer MCQ
Q-00095269
View explanation
Q107.

Which of the following functions is used to round off a number to a whole integer?

Single Answer MCQ
Q-00095270
View explanation
Q108.

What is the result of the following query? SELECT EmpID, COUNT(*) FROM SALE GROUP BY EmpID;

Single Answer MCQ
Q-00095271
View explanation
Q109.

Which SQL aggregate function cannot be used in the context of a WHERE clause?

Single Answer MCQ
Q-00095272
View explanation
Q110.

How can you find the maximum sale price for each employee using SQL?

Single Answer MCQ
Q-00095273
View explanation
Q111.

What would be the output of: SELECT ROUND(123.456, 0);?

Single Answer MCQ
Q-00095274
View explanation
Q112.

Which SQL clause is used to apply a filter on the results of a GROUP BY query?

Single Answer MCQ
Q-00095275
View explanation
Q113.

How do you find the average sale price from the Sale table?

Single Answer MCQ
Q-00095276
View explanation
Q114.

If you want to group data by two or more columns, how would you write the SQL query?

Single Answer MCQ
Q-00095277
View explanation
Q115.

What does the COUNT(DISTINCT column_name) function do?

Single Answer MCQ
Q-00095278
View explanation
Q116.

Which statement correctly uses the GROUP BY clause along with HAVING?

Single Answer MCQ
Q-00095279
View explanation
Q117.

When is it appropriate to use GROUP BY with aggregate functions?

Single Answer MCQ
Q-00095280
View explanation
Q118.

Which of the following could be a reason if your GROUP BY query returns fewer rows than expected?

Single Answer MCQ
Q-00095281
View explanation
Q119.

What data type should be used for columns that will be grouped and counted?

Single Answer MCQ
Q-00095282
View explanation
Q120.

Which SQL statement would return the average sale price for each employee, requiring grouping?

Single Answer MCQ
Q-00095283
View explanation
Q121.

What does the UNION operation do in SQL?

Single Answer MCQ
Q-00095284
View explanation
Q122.

What is the purpose of the Cartesian product in SQL when using two tables?

Single Answer MCQ
Q-00095285
View explanation
Q123.

When can UNION operation be applied?

Single Answer MCQ
Q-00095286
View explanation
Q124.

In SQL, when using two tables in a JOIN operation, which condition is typically specified?

Single Answer MCQ
Q-00095287
View explanation
Q125.

What will the result of the INTERSECT operation return?

Single Answer MCQ
Q-00095288
View explanation
Q126.

Which SQL statement would correctly use aliases for two tables DANCE and MUSIC?

Single Answer MCQ
Q-00095289
View explanation
Q127.

Which operation would you use to find rows in the first table that are not in the second?

Single Answer MCQ
Q-00095290
View explanation
Q128.

Which of the following SQL statements demonstrates a correct JOIN between two tables?

Single Answer MCQ
Q-00095291
View explanation
Q129.

If the result of a UNION operation contains 5 rows from Table A and 3 from Table B, but 2 rows are common, how many rows will the result contain?

Single Answer MCQ
Q-00095292
View explanation
Q130.

What happens if no condition is specified in a JOIN operation between two tables?

Single Answer MCQ
Q-00095293
View explanation
Q131.

Which of the following is NOT a valid SQL operation for relations?

Single Answer MCQ
Q-00095294
View explanation
Q132.

Which SQL command will filter results from a Cartesian product of tables A and B to show rows where attribute X is equal in both?

Single Answer MCQ
Q-00095295
View explanation
Q133.

In SQL, which operation retrieves unique entries from two combined tables?

Single Answer MCQ
Q-00095296
View explanation
Q134.

In which situation would you use a LEFT JOIN rather than an INNER JOIN?

Single Answer MCQ
Q-00095297
View explanation
Q135.

What will happen if you try to perform INTERSECT on tables with no common rows?

Single Answer MCQ
Q-00095298
View explanation
Q136.

Assuming tables DANCE and MUSIC exist, what does the SQL command 'SELECT D.Name, M.Audio FROM DANCE D JOIN MUSIC M ON D.Name = M.Name;' do?

Single Answer MCQ
Q-00095299
View explanation
Q137.

In terms of operations on relations, what represents a merged list with potential duplicates?

Single Answer MCQ
Q-00095300
View explanation
Q138.

What is one of the key differences between INNER JOIN and OUTER JOIN?

Single Answer MCQ
Q-00095301
View explanation
Q139.

If relation A has columns (ID, Name) and relation B has columns (ID, Age), which operation cannot be performed directly?

Single Answer MCQ
Q-00095302
View explanation
Q140.

If two tables, STUDENTS and COURSES, are joined without a specified JOIN condition, what will the result be?

Single Answer MCQ
Q-00095303
View explanation
Q141.

Which of the following can be considered the opposite of the INTERSECT operation?

Single Answer MCQ
Q-00095304
View explanation
Q142.

Which of the following statements correctly describes a foreign key relationship in the context of JOIN?

Single Answer MCQ
Q-00095305
View explanation
Q143.

If Table 1 has 3 records and Table 2 has 5 records with 1 common record, what will the result of Table 1 INTERSECT Table 2 be?

Single Answer MCQ
Q-00095306
View explanation
Q144.

What will be the effect of using the DISTINCT keyword in a query that joins two tables?

Single Answer MCQ
Q-00095307
View explanation
Q145.

Which SQL statement will return all combinations of the tuples of tables A and B?

Single Answer MCQ
Q-00095308
View explanation
Q146.

What is necessary to use when specifying a join condition?

Single Answer MCQ
Q-00095309
View explanation
Q147.

When using a self-join, what must be done differently concerning the table reference?

Single Answer MCQ
Q-00095310
View explanation
Learn Better On The App
Competitive revision

Challenge Your Friends

Compete in short duels with fast rounds, instant feedback, and zero boredom.

1v1 challenges
Fast recall training

Faster access to practice, revision, and daily study flow.

Edzy mobile app preview