Before Applying job posting in any websites or recruiting agencies or sending resumes to job recruiters or any other employment website you need to improve your skills on general knowledge, Aptitude, Puzzles, logical reasoning, general english, database, programming as per your job profile. Job recruiters or mostly preferring job candidates who are having more stuff in those categories mentioned above. So improving more skills on your job profile always boost up your career and your performance. Even hiring companies and job recruiters who are looking for many job posting websites actually they are looking and filtering on these activities. In these Sql Server section you need to update more questions to perform well in front of job recruiters and companies. Sql Server Interview questions are most important to score in interview, Update all questions to score well in all rounds in job interview.

Sql Server interview questions and answers

What are the different types of replication supported by SQL SERVER?

There are three types of replication supported by SQL SREVER:

Snapshot Replication
Snapshot Replication takes snapshot of one database and movies it to the other database. After initial load data can be refreshed periodically. The only disadvantage of this type of replication is that all data has to be copied each time the table is refreshed.

Transactional Replication
In transactional replication, data is copied first time as in snapshot replication, but later only the transactions are synchronized rather than replicating the whole database. You can either specify to run continuously or on periodic basis.

Merge Replication.
Merge replication combines data from multiple sources into a single central database. Again as usual, the initial load is like snapshot but later it allows change of data both on subscriber and publisher, later when they come on-line it detects and combines them and updates accordingly.

What is SQL injection?

It is a From of attack on a database – driven Web site in which the attacker executes unauthorized SQL commands by taking advantage of insecure code on a system connected to the Internet, bypassing the firewall. SQL injection attacks are used to steal information from a database from which the data would normally not be available and/ or to gain access to an organization’s host computers through the computer that is hosting the database

SQL injection attacks typically are easy to avoid by ensuring that a system has strong input validation.
As name suggest we inject SQL which can be relatively dangerous for the database . Example this is a simple SQL
SELECT email , passwd, login_id, full_name
FROM members
WHERE email = ‘x’

Now somebody does not put “x” as the input but puts “x ; DROP TABLE members;”. So the actual SQL which will execute is:
SELECT email , passwd , login_id , full_name
FROM members WHERE email = ‘x’ ; DROP TABLE members ;
Think what will happen to your database.

What is ACID fundamental ?

A transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties , called the ACID ( Atomicity, Consistency, Isolation, and Durability) properties, to qualify as a transaction:

A transaction must be an atomic unit of work; either all of its data modifications are performed or none of them is performed.

When completed, a transaction must leave all data in a consistent state. In a relational database, all rules must be applied to the transaction’s modifications to maintain all data integrity.

Modifications made by concurrent transactions must be isolated from the modifications made by any other concurrent transactions. A transaction either see data in the state it was before another concurrent transaction Modified it, or it sees the data after the second transaction has completed but it does not see an intermediate state . This is referred to as serializability because it result in the ability to reload the starting data and replay a series of transactions to end up with the data in the same state it was in after the original transactions were performed.

What are the different types of joins?

There are three types of joins :

what is INNER JOIN ?

Inner join shows matches only when they exist in both tsbles. Example, in the below SQL there are two tables Customers and Orders and the inner join in made on Customers Customerid and orders Customerid. So this SQL will only give you result with customers who have orders. If the customer does not have order, it will not display that record.

SELECT Customers. *, Orders.* FROM Customers INNER JOIN Orders ON Customers. Customer ID = Orders. Customer ID