0% found this document useful (0 votes)
49 views

150+ SQL Multiple Choice Questions (MCQS) and Answers

Uploaded by

Ashiya Ajare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

150+ SQL Multiple Choice Questions (MCQS) and Answers

Uploaded by

Ashiya Ajare
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

SQL Multiple Choice Questions


(MCQs) and Answers
Master SQL with Practice MCQs. Explore our
curated collection of Multiple Choice Questions.
Ideal for placement and interview preparation, our
questions range from basic to advanced, ensuring
comprehensive coverage of SQL. Begin your
placement preparation journey now!

Q1 What type of database model organizes data in tables


with rows and columns?

A Hierarchical

B Network

C Relational

D Object-Oriented

View Answer Report

Q2 In a database, what is a unique identifier for each record


in a table called?

A Primary key

B Secondary key

https://www.placementpreparation.io/mcq/sql/ 1/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

C Foreign key

D Index key

View Answer Report

Q3 Which SQL statement is used to retrieve data from a


database?

A UPDATE

B DELETE

C INSERT

D SELECT

View Answer Report

Q4 What is the purpose of normalization in a database?

A Increase data redundancy

B Optimize query speed

C Reduce data redundancy

https://www.placementpreparation.io/mcq/sql/ 2/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

D Improve data security

View Answer Report

Q5 Which of the following is not a characteristic of a good


database design?

A Data integrity

B Data redundancy

C Scalability

D Efficiency

View Answer Report

Q6 Which data type is used in SQL to store true or false


values?

A INT

B BOOLEAN

C VARCHAR

D FLOAT

https://www.placementpreparation.io/mcq/sql/ 3/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

View Answer Report

Q7 In SQL, which data type is best suited for storing large


texts such as articles or comments?

A TEXT

B VARCHAR

C CHAR

D BLOB

View Answer Report

Q8 Which SQL data type is used to store numerical values


with fixed precision and scale?

A DECIMAL

B INTEGER

C DATE

D VARCHAR

View Answer Report

https://www.placementpreparation.io/mcq/sql/ 4/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

Q9 In SQL, what is the difference between CHAR and


VARCHAR data types?

A CHAR is fixed length, VARCHAR is variable length

B CHAR is variable length, VARCHAR is fixed length

C No difference

D VARCHAR is used only for numeric data

View Answer Report

Q10 What data type would you use in SQL to store a date
and time value together?

A DATETIME

B DATE

C TIME

D TIMESTAMP

View Answer Report

Q11 Which SQL command is used to create a new table in a


database?

https://www.placementpreparation.io/mcq/sql/ 5/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

A CREATE

B ALTER

C DROP

D TRUNCATE

View Answer Report

Q12 What does the DROP command do in SQL?

A Adds a new row to a table

B Deletes an existing table

C Modifies a table

D Creates a new table

View Answer Report

Q13 In SQL, what is the purpose of the TRUNCATE


command?

A Deletes specific rows from a table

B Removes all rows from a table

https://www.placementpreparation.io/mcq/sql/ 6/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

C Changes table structure

D Creates a new table

View Answer Report

Q14 Which command should be used to change the datatype


of a column in an SQL table?

A CREATE

B ALTER

C DROP

D TRUNCATE

View Answer Report

Q15 What is the difference between the DROP and


TRUNCATE commands in SQL?

DROP deletes the table, TRUNCATE deletes only the


A
table data

TRUNCATE deletes the table, DROP deletes only the


B
table data

C No difference
https://www.placementpreparation.io/mcq/sql/ 7/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

D Both commands modify table data

View Answer Report

Q16 Which part of this statement is incorrect?

"CREATE TABEL Students (ID int, Name varchar(50));"

A TABEL

B Students

C ID int

D Name varchar(50)

View Answer Report

Q17 Identify the error in


"ALTER TABLE Students DROP COLUMN DateOfBirth date;"

A ALTER TABLE

B DROP COLUMN

C DateOfBirth

https://www.placementpreparation.io/mcq/sql/ 8/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

D date

View Answer Report

Q18 What needs to be changed in


"TRUNCATE Students;" to make it a valid SQL statement?

A TRUNCATE

B Students

C All Correct

D Add a WHERE clause

View Answer Report

Q19 Correct the syntax error in


"CREATE TABLE Students (ID int PRIMARY, Name
varchar(50));"

A PRIMARY

B ID int

C Name varchar(50)

D CREATE TABLE

https://www.placementpreparation.io/mcq/sql/ 9/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

View Answer Report

Q20 In "ALTER TABLE Students ADD COLUMN Email


varchar(50),
what is missing for this statement to be correct?

A ADD COLUMN

B Email

C varchar(50)

D All Correct

View Answer Report

Q21 Which SQL command is used to add a new record to a


table?

A SELECT

B DELETE

C UPDATE

D INSERT

View Answer Report

https://www.placementpreparation.io/mcq/sql/ 10/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

Q22 What does the UPDATE command in SQL do?

A Deletes a record

B Modifies an existing record

C Adds a new record

D Retrieves data

View Answer Report

Q23 In SQL, what is the purpose of the WHERE clause in a


DELETE statement?

A Specifies which database to use

B Specifies which table to delete from

C Specifies which records to delete

D Specifies how to order the records

View Answer Report

Q24 Which command is used to remove a specific record


from a table in SQL?

A DELETE
https://www.placementpreparation.io/mcq/sql/ 11/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

B UPDATE

C INSERT

D SELECT

View Answer Report

Q25 How does a transaction ensure data integrity in SQL?

A By locking the database

By allowing multiple users to modify data


B
simultaneously

By ensuring all operations within the transaction are


C
completed before committing

D By automatically updating all related tables

View Answer Report

Q26 In the query "SELECT Name FROM Employees WHERE


Age > 30 AND Department = 'HR';",
what needs to be corrected?

A All Correct

https://www.placementpreparation.io/mcq/sql/ 12/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

B The SELECT keyword

C The WHERE clause

D The AND operator

View Answer Report

Q27 Identify the error in


"UPDATE Employees SET Salary = Salary * 1.05 WHERE;"

A UPDATE keyword

B SET keyword

C WHERE clause

D No error

View Answer Report

Q28 What is missing in the following statement?

"INSERT INTO Employees (Name, Department) VALUES


('John', 'Sales');"

A All Correct

B Employee ID

https://www.placementpreparation.io/mcq/sql/ 13/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

C A WHERE clause

D Additional column names

View Answer Report

Q29 Correct the syntax error in


"DELETE FROM Employees HAVING Age < 25;"

A DELETE keyword

B FROM keyword

C HAVING keyword

D No syntax error

View Answer Report

Q30 In "UPDATE Employees SET Age = Age + 1 WHERE


Department IN ('Sales', 'HR') AND Age >= 30;",
identify the error.

A The IN operator

B The AND operator

C No error

https://www.placementpreparation.io/mcq/sql/ 14/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

D The SET keyword

View Answer Report

1 2 ... 10

Learn
Quantitative Aptitude

Data Interpretation

Logical Reasoning

Verbal Reasoning

Non Verbal Reasoning

Verbal Ability

Companies

https://www.placementpreparation.io/mcq/sql/ 15/16
7/29/24, 9:29 PM 150+ SQL Multiple Choice Questions (MCQs) and Answers

Accenture

CTS

Deloitte

Infosys

TCS

Wipro

Zoho

Resources
Blog

Web Stories
Powered by

https://www.placementpreparation.io/mcq/sql/ 16/16

You might also like