SQL Server Interview Questions and Answers For Freshers
SQL Server Interview Questions and Answers For Freshers
1. What is Database?
2. What is DBMS?
DBMS stands for Database Management System. DBMS is a system software responsible
for the creation, retrieval, update, and management of the database. It ensures that our
data is consistent, organized, and is easily accessible by serving as an interface between
the database and its end-users or application software.
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 1/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
RDBMS stands for Relational Database Management System. The key difference here,
compared to DBMS, is that RDBMS stores data in the form of a collection of tables, and
relations can be defined between the common fields of these tables. Most modern
database management systems like MySQL, Microsoft SQL Server, Oracle, IBM DB2, and
Amazon Redshift are based on RDBMS.
4. What is SQL?
SQL stands for Structured Query Language. It is the standard language for relational
database management systems. It is especially useful in handling organized data
comprised of entities (variables) and relations between different entities of the data. This
is most Important SQL Server Interview Questions
SQL is a standard language for retrieving and manipulating structured databases. On the
contrary, MySQL is a relational database management system, like SQL Server, Oracle,
or IBM DB2, that is used to manage SQL databases.
RDBMS stands for Relational Database Management System. The key difference here,
compared to DBMS, is that RDBMS stores data in the form of a collection of tables, and
relations can be defined between the common fields of these tables. Most modern
database management systems like MySQL, Microsoft SQL Server, Oracle, IBM DB2, and
Amazon Redshift are based on RDBMS
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 2/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
Will create a table Dummy with 3 columns; Name, Address, and PhoneNo.
Windows Mode
Mixed Mode
Modes can be changed by selecting the tools menu of SQL Server configuration
properties and choose the security page.
The CHECK constraint enforces integrity. It is applied to a column in a table for limiting
the values that can be inserted in the same. A column upon which the CHECK constraint
is applied can only have some specific values. Following is an example of applying the
CHECK constraint in a SQL Server database:
In RDBMS, the process of organizing data to minimize redundancy and surety of logical
data integrity is called normalization. In normalization, the database is divided into two
or more tables, and a relationship is defined among the tables. Normalization technique
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 3/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
increases performance for the database. This is most Important SQL Server Interview
Questions
Types of Normalization
1NF
2NF
3NF
BCNF
4NF
5NF
However, the first three types are only frequently used, where “NF” stands for normal
form. The originator of the RD model “E.F Codd” has proposed the process
“normalization” with the first “normal form” and continued till the third normal form.
The Standby server is the type of server which is brought online when the primary
server goes offline, and the application needs continuous availability of the server. The
requirement for a mechanism that can shift a primary server to a secondary or standby
server is always there.
Hot standby: Hot standby method is a method of redundancy in which the primary and
secondary backup systems run simultaneously so the data also present in the secondary
server in real-time and this way both systems contain identical information.
Cold standby: Cold standby is the method of redundancy in which the secondary server
is only called when the primary server fails. Cold standby systems are used in cases
where data is changed infrequently or for nor critical applications. The physical
replacement of the Primary server with the standby server occurs in cold standby.
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 4/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
Triggers are used to execute a batch of SQL code when insert or update or delete
commands are executed against a table. Triggers are automatically triggered or executed
when the data is modified. It can be executed automatically on the insert, delete and
update operations. This is most Important SQL Server Interview Questions
Insert
Delete
Update
Instead of
SQL injection is an attack by malicious users in which malicious code can be inserted into
strings that can be passed to an instance of SQL Server for parsing and execution. All
statements have to checked for vulnerabilities as it executes all syntactically valid
queries that it receives.
Relationships are used in SQL Server to link columns of different tables. These are of
three types:
1. One-to-One – A single column in a table has one dependent column in some other
table.
2. One-to-Many/Many-to-one – A single column in a table has more than one dependent
column in the other table (One-to-many). More than one column in a table has a
single dependent column in the other table (Many-to-one).
3. Many-to-Many – Multiple columns in a table have multiple dependent columns in some
other table.
16. What are the various encryption mechanisms in the SQL Server?
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 5/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
Asymmetric keys
Certificates
Symmetric keys
Transact-SQL functions
Transparent Data Encryption
ISNULL function is used to check whether the value is given is NULL or not NULL in the
SQL server. This function also provides to replace a value with the NULL. This is most
Important SQL Server Interview Questions
FOR clause is mainly used for XML and browser options. This clause is mainly used to
display the query results in XML format or in the browser.
For SQL Server 2008 100 Index can be used as the maximum number per table. 1
Clustered Index and 999 Non-clustered indexes per table can be used in SQL Server.
1000 Index can be used as the maximum number per table. 1 Clustered Index and 999
Non-clustered indexes per table can be used in SQL Server.
1 Clustered Index and 999 Non-clustered indexes per table can be used in SQL Server.
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 6/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
UNION: To select related information from two tables UNION command is used. It is
similar to the JOIN command.
UNION All: The UNION ALL command is equal to the UNION command, except that
UNION ALL selects all values. It will not remove duplicate rows, instead, it will retrieve
all rows from all tables.
A table column with this constraint is called the key column for the table. This constraint
helps the table to make sure that the value is not repeated and also that there are no
null entries.
Now, this column does not allow null values and duplicate values. You can try inserting
values to violate these conditions and see what happens. A table can have only one
Primary key. Multiple columns can participate in the primary key.
To define the relationship between two tables (one is called the parent and the other
one is the child table) connected by columns, a foreign key constraint is used. In this
constraint, the values of the child table must appear in the parent table, which means
that for a foreign key, one table should point to a Primary Key in another table. A table
can have multiple foreign keys and each foreign key can have a different referenced
table.
Joins are useful for bringing data together from different tables based on their database
relations. First, we will see how the join operates between tables. Then, we will explore
the Order of Execution when both a join and condition exist. Finally, we will move our
exploration to the importance of the Join order.
A Join condition defines the way two tables are related in a query by:
Specifying the column to be used for the Join from each table. In joining foreign keys
in a table and its associated key in the other table.
To use the logical operator in comparing values from the columns.
There are three types of joins available based on the way we join columns of two
different tables.
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 7/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
1. Full Join
2. Inner Join
3. Left outer join
4. Right outer join
CyberTecz Jobs is Available on Play Store, Download Now & Get an Inside Look
into Latest Campus Recruitment: Click here
Join Telegram Group of Daily Jobs Updates for 2010-2023 Batch: Click Here
If You Want To Get More Daily Such Jobs Updates, Career Advice Then Join the
Telegram Group From Above Link Also Press Red Bell Icon At The Left Side of
Page To Subscribe our Updates.
Infosys Recruitment 2021 For Freshers has been Started Across India: Click
here
Accenture Hiring Freshers of Package 4.5 LPA Across India: Click here
How To Get a Job Easily: Professional Advice For Job Seekers: Click here
A Leadership Guide For How To Win Hearts and Minds: Click here
Career Tips for Freshers: Top 7 Hacks To Land Your Target Job: Click here
Feel Like Demotivated? Check Out our Motivation For You: Click here
Top 5 Best Mobile Tracking App in 2021 For Mobile & PC: Click here
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 8/9
1/8/23, 2:53 PM SQL Server Interview Questions and Answers For Freshers
Cyber Tecz
Our Vision is To Provide Latest Off Campus Placement Papers, Interview Questions, Resume
Writing Tips, Exam Pattern With Syllabus, Career Advice And Many More With Latest Jobs
Information.
https://advisor.cybertecz.in/sql-server-interview-questions-and-answers-for-freshers-and-experienced/ 9/9