Explore topic-wise MCQs in SQL Server.

This section includes 44 Mcqs, each offering curated multiple-choice questions to sharpen your SQL Server knowledge and support exam preparation. Choose a topic below to get started.

1.

The choice of XML technology, native XML versus XML view, generally depends upon the following factors?

A. Storage options
B. Query capabilities
C. Indexing
D. All of the Mentioned
Answer» E.
2.

What is the purpose of the primary XML index?

A. Persisted representation of data
B. Shredded representation of data
C. Structured representation of data
D. None of the Mentioned
Answer» E.
3.

What is index type for XML index entries?

A. 3
B. 4
C. 5
D. 6
Answer» B. 4
4.

Which operation cannot be performed on XML schema collection?

A. DROP
B. DELETE
C. CREATE
D. UPDATE
Answer» C. CREATE
5.

CONTAINS and CONTAINSTABLE look for a _______ match for the phrase.

A. exact
B. similar
C. different
D. none of the mentioned
Answer» B. similar
6.

Following content of XML elements are indexed in full text?

A. Content of the XML value
B. Non numerical value in content of XML attributes
C. The content of XML elements.
D. None of the mentioned
Answer» C. The content of XML elements.
7.

The CONTAINS and FREETEXT predicates return a _________ value.

A. TRUE or FALSE
B. Scalar
C. One
D. All of the mentioned
Answer» B. Scalar
8.

With XML DML, which of the operations can be performed on nodes?

A. Insert nodes
B. Change nodes
C. Delete nodes
D. None of the mentioned
Answer» D. None of the mentioned
9.

Which of the following statement would import additional schema or schema components into an existing collection object?

A. IMPORT XML SCHEMA COLLECTION
B. ALTER XML SCHEMA COLLECTION
C. UPDATE XML SCHEMA COLLECTION
D. ADD XML SCHEMA COLLECTION
Answer» C. UPDATE XML SCHEMA COLLECTION
10.

Which of the following function is contained by both full text search and Xquery?

A. search()
B. contain()
C. contains()
D. query()
Answer» D. query()
11.

Which of the following function returns an instance of the XML data type?

A. query()
B. value()
C. nodes()
D. none of the Mentioned
Answer» B. value()
12.

What is every identifier in an XQuery called?

A. Name
B. QName
C. Qidt
D. Qnam
Answer» C. Qidt
13.

We can create a full-text index on _____________

A. table
B. view
C. indexed view
D. all of the mentioned
Answer» E.
14.

What are Catalog Views for XML?

A. Schema collections
B. View Collections
C. Unstructured data
D. None of the Mentioned
Answer» B. View Collections
15.

Statement for dropping XML index is __________

A. DROP INDEX
B. DELETE INDEX
C. REMOVE INDEX
D. None of the Mentioned
Answer» B. DELETE INDEX
16.

XML View Technology is useful in the following situations?

A. Your application needs system catalog views to administer your XML data and XML schema
B. Indexing Capabilities
C. You want to bulk load XML data and decompose them into the underlying tables by using the XML view
D. None of the Mentioned
Answer» D. None of the Mentioned
17.

Every database you create has which collection by default?

A. sys
B. sym
C. syx
D. none of the Mentioned
Answer» B. sym
18.

Functions on numerical values in Xquery are ___________

A. ceiling
B. concat
C. contains
D. number
Answer» B. concat
19.

FREETEXTTABLE is a full text _____________

A. Predicate
B. Function
C. Procedure
D. All of the mentioned
Answer» C. Procedure
20.

Different xml modes available for xml clauses are __________

A. RAW
B. AUTO
C. PATH
D. All of the mentioned
Answer» E.
21.

Which of the following predicates is used for full text search?

A. TEXT()
B. FREETEXT()
C. TEXT()
D. All of the mentioned
Answer» C. TEXT()
22.

Sample applications to illustrate XML functionality in SQL Server are _____________

A. Implementing XML in SQL Server
B. XmlOnlineCatalog
C. XmlSurvey
D. All of the mentioned
Answer» E.
23.

Can we use untyped XML data type in the following situations?

A. You have schema for your XML data and you want the server to validate your XML data according to the XML schema
B. You want to take advantage of storage and query optimizations based on type information
C. You want to take better advantage of type information during compilation of your queries
D. You do not have a schema for your XML data
Answer» E.
24.

Full-text search is an ________ component of the SQL Server Database Engine.

A. slower
B. optimal
C. faster
D. none of the mentioned
Answer» C. faster
25.

Which of the following is not a xml data type method?

A. query()
B. value()
C. nodes()
D. none of the Mentioned
Answer» E.
26.

Which of the following is not a XML storage option?

A. Native storage as XML data type
B. Mapping between XML and relational storage
C. Small object storage
D. None of the Mentioned
Answer» D. None of the Mentioned
27.

Atomization is process of extracting ________ value of an item.

A. XML value
B. Non numerical value
C. Typed
D. None of the mentioned
Answer» D. None of the mentioned
28.

Different types of errors raised during Xquery operation are ______________

A. Static
B. Dynamic
C. Type
D. All of the mentioned
Answer» E.
29.

Which of the following part of the XML data stored in an XML column is very important for locking?

A. Granularity
B. Degree of Structure
C. Hierarchy
D. None of the mentioned
Answer» B. Degree of Structure
30.

SQL Server 2008 has made several extensions to the XML Schema support which includes?

A. Support for lax validation
B. Added support for list and union types
C. Improved handling of xs:time
D. All of the mentioned
Answer» E.
31.

In which of the following scenario, using XML native storage would be inappropriate?

A. Fixed schema
B. You want to query and modify your XML data
C. You want to index the XML data for faster query processing
D. Your application needs system catalog views to administer your XML data and XML schema
Answer» B. You want to query and modify your XML data
32.

Which of the reasons will force you to use XML data model in SQL Server?

A. Your data is sparse or you do not know the structure of the data
B. Your data represents containment hierarchy
C. Order is inherent in your data
D. All of the Mentioned
Answer» E.
33.

SQL Server provides how many Xquery methods?

A. 3
B. 4
C. 5
D. 6
Answer» D. 6
34.

Why do we use exist methods in Xquery?

A. To determine if the XML data contains a certain node
B. To examine the XML and return back a scalar value
C. To Shred the XML nodes of the XML data into relational columns
D. To search inside xml data types
Answer» B. To examine the XML and return back a scalar value
35.

XML datatype was introduced in which of the following versions of SQL Server?

A. SQL Server 2000
B. SQL Server 2005
C. SQL Server 2008
D. SQL Server 2012
Answer» C. SQL Server 2008
36.

What is the hybrid model in SQL Server?

A. Combination of relational and XML data type columns
B. Combination of relational and non relational data type columns
C. Using XML with views
D. Using XML with triggers
Answer» B. Combination of relational and non relational data type columns
37.

Contents of sys.xml_schema_collections are _____________

A. Number of disk pages occupied
B. Indexing Capabilities
C. Predefined namespaces
D. None of the Mentioned
Answer» D. None of the Mentioned
38.

Which of the following code will not throw an error?

A. DECLARE @child HierarchyId = (SELECT Node FROM H WHERE Name = 'S1')
B. DECLARE @child HierarchyId = (SELECT Node FROM H WHERE Name = 'S1')
C. DECLARE @child HierarchyId = (SELECT Node FROM H WHERE Name = 'S1')
D. None of the mentioned
Answer» B. DECLARE @child HierarchyId = (SELECT Node FROM H WHERE Name = 'S1')
39.

Which of the following function will be used in the following code for moving nodes?

A. GetReparentedVal
B. GetReparentedValue
C. GetValue
D. None of the mentioned
Answer» C. GetValue
40.

Which of the following function returns true in the following code?

A. IsDescendantOf
B. DescendantOf
C. IsDescendant
D. None of the mentioned
Answer» B. DescendantOf
41.

What is purpose of GetDescendant method in the following code?

A. Takes 2 arguments
B. Takes 3 arguments
C. Takes 4 arguments
D. All of the mentioned
Answer» B. Takes 3 arguments
42.

Which of the following code is used to have a Breadth First index?

A. CREATE UNIQUE bfs_index
B. CREATE UNIQUE INDEX bfs_index
C. CREATE INDEX bfs_index
D. CREATE UNIQUE INDEX bfs_index
Answer» C. CREATE INDEX bfs_index
43.

Which of the following is invalid code associated with hierarchical data type?

A. CREATE TABLE H (
B. CREATE TABLE H (
C. CREATE TABLE H (
D. All of the Mentioned
Answer» B. CREATE TABLE H (
44.

Which of the following code snippet insert the top level manager ‘Jeff Brown’ as hierarchy root?

A. INSERT INTO Employees
B. INSERT INTO Employees
C. INSERT INTO Employees
D. INSERT INTO Employees
Answer» B. INSERT INTO Employees