Showing posts with label sql server question and answers. Show all posts
Showing posts with label sql server question and answers. Show all posts

Sunday, June 22, 2025

SQL SERVER TOP 50 INTERVIEW QUESTION AND ANSWERS

 # 50 SQL Server Interview Questions with Answers


## Basic SQL Server Questions


1. **What is SQL Server?**

   - SQL Server is a relational database management system (RDBMS) developed by Microsoft that supports transaction processing, business intelligence, and analytics applications.


2. **What are the different editions of SQL Server?**

   - Enterprise, Standard, Web, Developer, and Express editions.


3. **What is the difference between clustered and non-clustered indexes?**

   - A clustered index determines the physical order of data in a table (only one per table). A non-clustered index is a separate structure that points to the data (multiple allowed per table).


4. **What is a primary key?**

   - A primary key is a column or set of columns that uniquely identifies each row in a table and cannot contain NULL values.


5. **What is a foreign key?**

   - A foreign key is a column or set of columns that establishes a relationship between data in two tables, enforcing referential integrity.


## Intermediate SQL Server Questions


6. **What is the difference between DELETE, TRUNCATE, and DROP?**

   - DELETE removes rows one at a time with logging, TRUNCATE removes all rows quickly without logging individual row deletions, DROP removes the entire table structure.