Latest Qualification Jobs


ENTER YOUR E-MAIL FOR FREE JOB ALERTS RIGHT INTO YOUR INBOX -
AFTER THIS, YOU WILL NOT MISS ANY GOVT/PVT VACANCY
Check Your Email To Activate the Confirmation Link

SQL Server Interview Questions and Answers PDF For Experienced, Freshers

SQL Server Interview Questions

Want to prepare well for SQL Server Interview? If yes then, check the frequently asked SQL Server Interview Questions from here. Following SQL Server Interview Questions And Answers will helpful for Experienced, and Freshers, if they want to get in DBA world.

So, check this page thoroughly and also download SQL Server Interview Questions Pdf to prepare well for MS SQL Server Interview. Qualified contenders in interview session will be recruited for Database Administrator/professional posts.

SQL Server Interview Questions

Do you know that, Why SQL Server is designed? How does a SQL Server Database Work? How do you use SQL Server? Etc. If you want to get the answers of these questions then you need to go through this page of recruitmentresult.com.

And, here in this article, we’re providing the SQL Server Interview Questions And Answers For Experienced / Fresehers With Examples. So, before going to appear in SQL Server Interview session, must check below listed Interview Questions For SQL Server.

Check Here: Interview Preparation Tips

SQL Server Interview Questions and Answers

Q.1 What are the two authentication modes in SQL Server?

Answer: There are two authentication modes:

  • Windows Mode
  • Mixed Mode

Q.2 What Is SQL Profiler?

Answer: SQL Profiler is a tool which permits system administrator to observe events in the SQL server. It is mostly used to capture and save information about all events of a file or a table for analysis.

Q.3 What are the differences between local and global temporary tables?

Answer: The differences between local and global temporary tables are as shown below, take a look…

Local Temporary Tables  Global Temporary Tables
The Local Temporary Tables are visible when there is a connection, and are deleted when the connection is closed.Global temporary tables are visible to all users, and are deleted when the connection that created it is closed.

Learn more: How To Overcome Job Interview Fear

Q.4 What is CHECK constraint?

Answer: if you want to limit the values that can be placed in a column, then you can use theCHECK constraint. It is also recognized as enforce integrity

Q.5 Can SQL servers linked to other servers?

Answer: Yes, it can be connected to any database which has OLE-DB provider to give a link.

Must Know: Common Interview Mistakes

SQL Server DBA Interview Questions

Following SQL Server DBA Interview Questions And Answers are beneficial for Professionals and Freshers aspirants. So check below listed SQL Server DBA Interview Questions and Answers for Experienced

Q.6 What is SQL server agent?

Answer: It plays animportant role in day to day tasks of SQL server administrator (DBA) and the Server agent’s determination is to implement the tasks effortlessly with the scheduler engine which permits our jobs to run at scheduled date and time.

Read: Interview Tips For Freshers

Q.7 What are scheduled tasks in SQL Server?

Answer: Scheduled tasks are used to systematize processes that can be run on a scheduled time at a regular intermission. This scheduling of tasks assists to decrease human interference during night time and feed can be completed at a specific time. User can also mandate the tasks in which it has to be created.

Q.8 How exceptions can be handled in SQL Server Programming?

Answer: In SQL Server Programming, exceptions are handled using TRY—CATCH constructs and it is handles by writing scripts inside the TRY block and error handling in the CATCH block.

Check: DBMS Interview Questions & Answers

Q.9 What are the sub query and its properties?

Answer: A sub-query is a request which can be nested inside a leading query like Select, Update, Insert or Delete statements. This can be used when expression is allowed and properties of sub query can be defined as

  • A sub query should not have order by clause
  • A sub query should be placed in the right hand side of the comparison operator of the main query.
  • A sub query should be enclosed in parenthesis because it needs to be executed first before the main query.
  • More than one sub query can be included

Q.10 What are the types of sub query?

Answer: There are three types of sub query –

  • Single row sub query which returns only one row
  • Multiple row sub query which returns multiple rows
  • Multiple column sub query which returns multiple columns to the main query. With that sub query result, Main query will be executed.

Must Know: How To Develop Good Communication Skills

SQL Server Query Interview Questions

First of all, we’re going to create two tables namely Empdetails and Empsalary. The following SQL Server Queries Interview Questions will be based on it, take a look…

Table – Empdetails

EmpIdFullNameManagerIdDateOfJoining
121John Snow Deepak Garg32101/31/2014
321Abc Xyz Prince Jain98601/30/2015
421KuldeepRanaHanishMalhotra87627/11/2016


Table – Empsalary

EmpIdProjectSalary
121P18000
321P21000
421P112000

Check here: How to Answer Confusing Interview Questions

Q.11 Write a query to fetch the count of employees working in project ‘P1’.

Answer:SELECT COUNT(*) FROM Empsalary WHERE Project = ‘P1’;

Q.12 Write a query to fetch project wise of count of employees sorted by project’s count in descending order.

Answer: Following command is used to perform above query:

SELECT Project, count(EmpId) EmpProjectCount FROM Empsalary GROUP BY Project ORDER BY EmpProjectCount DESC;

Q.13 Write a query to fetch common records between two tables.

Answer: SELECT * FROM Empsalary INTERSECT SELECT * FROM ManagerSalary

Q.14 Write a query to fetch all the Employees from EmployeeDetails table who joined in Year 2016.

Answer: SELECT * FROM Empsalary WHERE DateOfJoining BETWEEN ’01-01-2016′ AND date ’31-12-2016′;

Q.15 Write a query to create an empty table with same structure as some other table.

Answer: SELECT * INTO newTable FROM EmployeeDetails WHERE 1 = 0;

Read: Difference Between Resume And CV 

SQL Server Developer Interview Questions

Q.16 Is it possible to rename a database?  If so, how would you rename the database?

Answer: Yes, a database can be renamed and it is possible to rename a database by one of these options:

  • Execute the sp_renamedb system stored procedure.
  • Execute the sp_rename system stored procedure and specify ‘database’ as the parameter.
  • Use Management Studio by right clicking on the database and selecting the ‘Rename’ option.

Q.17 What are the two commands to remove all of the data from a table?

Answer: By using the following two commands i.e. The DELETE command and The TRUNCATE command, you can easily remove all of the data from a table.

Q.18 What are the three ways that Dynamic SQL can be executed?

Answer: Following are the three ways that Dynamic SQL can be executed

  • Writing a query with parameters.
  • Using EXEC.
  • Using sp_executesql.

Q.19 How can you delete duplicate records in a table with no primary key?

Answer: By using the Use the SET ROWCOUNT command, you can delete duplicate recordswith no primary key.

Q.20 Is it True or False that SQL Server can format the date in over 10 different patterns.

Answer: Yes, it is true. By using the CONVERT command, there are over 15 different date formats.

MS SQL Server Interview Questions

Q.21 Which TCP/IP port does SQL Server run on? How can it be changed?

Answer: SQL Server runs on port 1433 and it can be changed from the Network Utility TCP/IP properties.

Q.22 What are the different index configurations a table can have?

Answer: A table will have the following index configurations as described below:

  • No indexes
  • A clustered index
  • A clustered index and many nonclustered indexes
  • A nonclustered index
  • Many nonclustered indexes

Q.23 What is the purpose of FLOOR function?

Answer: FLOOR function is used to round up a non-integer value to the previous least integer for example FLOOR (6.7) and it will returns 6.

Q.24 What is a Trigger?

Answer: Triggers are used to perform a batch of SQL code when insert or update or delete commands are implemented against a table. Triggers are spontaneously triggered or accomplished when the data is altered. It can be performed automatically on insert, delete and update operations.

Q.25 What are the types of Triggers?

Answer: There are four types of triggers and they are:

  • Insert
  • Delete
  • Update
  • Instead of

SQL Server Interview Questions ByShivprasadKoirala

Following SQL Server Interview Questions and Answers for Experienced is helpful for preparing in systematic way. So, check below mentioned SQL Server Interview Questions For Experienced Professionals.

Q.26 What is Bulkcopy in SQL?

Answer: Bulkcopy is a tool used to copy big amount of data from Tables and this tool is used to load huge amount of data in SQL Server.

Q.27 What are the differences between Stored Procedure and the dynamic SQL?

Answer: The difference between Stored Procedure and the dynamic SQL as shown below, take a look…

Stored ProcedureDynamic SQL
It is a set of statements which is stored in a compiled form
  • It a set of statements that dynamically constructed at runtime.
  • It will not be stored in a Database and it simply execute during run time

Check: How To Build Strong & Good Vocabulary

Q.28 What is Collation?

Answer: Collation is defined to identify the sort order in a table and there are three types of sort order –

  • Case sensitive
  • Case Insensitive
  • Binary

Q.29 What is ISNULL() operator?

Answer: The ISNULL() function is used to check whether value given is NULL or not NULL in sql server and this function also provides to replace a value with the NULL.

You may also read- Best Tips to Develop Your Personality

Q.30 What is the use of @@SPID?

Answer: @@SPID returns the session ID of the current user process.

Download From Here: SQL Server Interview Questions and Answers PDF

Notable Note:

Dear job seekers go through above provided SQL Server Interview Questions and crack the SQL server Interview Session. Bookmark this page or subscribe to our free email service and get updated details SQL Server DBA Scenario Based Interview Questions And Answers.

Follow us on Face book or Goggle plus to fetch details about SQL Server 2008 / 2012 Interview Questionson your timeline directly. If you have any query then you can write your comment in comment box which is given below. We will definitely solve it as soon as possible. Best of luck and thank you for visiting us…

Something That You Should Put An Eye On

How to Write a Good ResumePersonality Improvement Tips
Develop Good Communication SkillsGroup Discussion: Dos and Don’ts
Interview Preparation for Getting a JobWhat Makes You Angry The Most
What Are Your Strength and WeaknessPhone Interview Tips
How To Dress For An InterviewWhy Should We Hire You?

Filed in: Interview

Leave a Reply

Submit Comment