0% found this document useful (0 votes)
46 views10 pages

Repost SQL Interview QnA?

Uploaded by

Geoffrey Ngoma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views10 pages

Repost SQL Interview QnA?

Uploaded by

Geoffrey Ngoma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

TOP 20 SQL INTERVIEW

QUESTIONS AND ANSWERS

SQL
MosT ASKED INTERVIEWONA
"MasterInterview QnA,Secure yourfuture job."
What is SQL?

Answer: SQL (Structured Query Language) is a


language for managing relational databases,
performing CRUD operations.

2. What are the types of SQL commands?

Answer: DDL (CREATE, ALTER, DROP), DML (INSERT,


UPDATE, DELETE), and DCL (GRANT,REVOKE).

3.What is a primary key?

Answer: A unique identifier for a table record,

ensuring data consistency and integrity.

vOUTH
Icon of
Raushan Kumar
(@rausha_kuna
4. What is a foreign key?

Answer: A field linking two tables, referencing the


primary key ofanother table.

5. What is a join?

Answer: Combines data from two tables based on a


common column, using INNER, LEFT, RIGHT, or FULL
OUTER joins.

6. What is a subquery?

Answer: A query nested inside another query,


returningdata for further processing.

vOUTH
Icon of
Raushan Kumar
(@rausha_kunat
Raushan Kumar

7. What is an index?

Answer: Improves query performance by providing


quick access to data, like a book index.

What
8. is a view?

Answer: A virtual table based on a query,simplifying


complex data access.

9.What is a stored procedure?

Answer:A reusable code block performing a specific


task, like a recipe.

vOUTH
Icon of
Raushan Kumar
@rausha_kumar
10. How do you optimize a slow query?

Answer: Use indexes, limit results, avoid SELECT *,

and optimize database design.

What
11. is normalization?

Answer: Organizes data to minimize redundancy and


improve data integrity, in 1NE, 2NE, and 3NF forms.

12. How do you handle duplicate records?

Answer: Use DISTINCT,GROUP BY,or eliminate


during data entry.

vOUTH
Icon of
Raushan Kumar
(@raushan_kunar
13.What is a transaction?

Answer: A sequence ofoperations executed as a single


unit, ensuring atomicity.

14. What are the ACID properties?

Answer: Atomicity, Consistency, Isolation, and

Durability, ensuring reliable transactions.

15. How do you secure a database?

Answer: Use authentication,access control,


encryption, backups, and secureconnections.

vOUTH
Icon of
Raushan Kumar
(@rausha_kunat
16. What is data nodeling?

Answer: Represents data structures and relationships,


like a blueprint.

What
17. is denormalization?

Answer: Combines multiple tables for performance

gains, but may lead to data redundancy.

18. How do you troubleshoot SQL errors?

Answer: Check syntax, data types, query logic, and


database constraints.

vOUTH
Icon of
Raushan Kumar
@rausha_kumar
19. What isa cursor?

Answer: A temporary result set used for row-by-row

processing.

20. What is a trigger?

Answer: A automaticscript executed on specific


database events, like INSERT or UPDATE.

SQL
vOUTH
Icon of
Raushan Kumar
@rausha_kumar
Note:

These questions cover basic SQL concepts,


database design, performance optimization,
security, and troubleshooting.
Raushan Kumar
(@rauskan_ kunat

SQL

vOUTH
Icon of
Raushan Kumar
(@rausha_kunat
Follow
Raushan Kumar
for amazing posts, or you
might miss out!

You're The

YOUTH
Icon of Worlda
BE FEARLE
COURAC
& CON

Share or Repost

©Raushan Kumar. All rights reserved.

You might also like