0% found this document useful (0 votes)
146 views

SQL Server Interview Questions and Answers

This document discusses interview questions and answers related to SQL Server. It includes questions about XML data types, magic tables, SQL Profiler, linking SQL Servers, types of subqueries, SQL Server Agent, triggers, global temporary tables, collations, and identity columns. Some key topics covered are using XML data types to store XML documents, magic tables that are created for insert and delete operations, using SQL Profiler to monitor server events, linking SQL Server to other databases, the three types of subqueries, using SQL Server Agent to automate jobs, triggers that execute on data modifications, global temporary tables having scope outside a session, and identity columns that auto-increment numbers.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views

SQL Server Interview Questions and Answers

This document discusses interview questions and answers related to SQL Server. It includes questions about XML data types, magic tables, SQL Profiler, linking SQL Servers, types of subqueries, SQL Server Agent, triggers, global temporary tables, collations, and identity columns. Some key topics covered are using XML data types to store XML documents, magic tables that are created for insert and delete operations, using SQL Profiler to monitor server events, linking SQL Server to other databases, the three types of subqueries, using SQL Server Agent to automate jobs, triggers that execute on data modifications, global temporary tables having scope outside a session, and identity columns that auto-increment numbers.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Server Interview Questions and Answers

1. What do mean by XML Datatype?


XML data type is used to store XML documents in the SQL Server database. Columns and variables are
created and store XML instances in the database.

2. What are the Magic Tables in SQL Server?

Insert and Delete tables are created when the trigger is fired for any DML command. Those tables are
called Magic Tables in SQL Server. These magic tables are used inside the triggers for data transaction.

3. What Is SQL Profiler?


SQL Profiler is a tool which allows database administrators to monitor events in the SQL server. This is
mainly used to capture and save data about each event of a file or a table for analysis.

4. Can SQL Servers linked to other servers?


SQL Server can be connected to any database which has OLE-DB provider to give a link. Example: Oracle
has OLE-DB provider which has link to connect with the SQL Server group.

5. What are the types of sub query?


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.

6. What is SQL Server Agent?


The SQL Server Agent plays a vital role in day to day tasks of SQL Server Administrator.  Server Agent’s
purpose is to implement the tasks easily with the scheduler engine which allows our jobs to run at
scheduled date and time which we can automate according to our requirements.

7. What is a Trigger?
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 insert, update and delete operations.

8. How Global Temporary Tables are represented and its scope?


Global temporary tables are represented with ## before the table name. Scope will be outside the
session whereas local temporary tables are inside the session. Session ID can be found using @@SPID.

9. What is a Collation?
Collation is defined to specify the sort order in a table. There are three types of sort order –
1. Case Sensitive (CS)
2. Case Insensitive (CI)
3. Binary

10. What is an IDENTITY column in INSERT statements?


IDENTITY column is used in table columns to make that column as auto incremental number or a
surrogate key.

You might also like