Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
298 Cards in this Set
- Front
- Back
Which system stored procedure changes the configuration settings for Database Mail, such as limiting the size of e-mail attachments or configuring the logging level?
|
The sysmail_configure_sp system stored procedure
|
|
Which database object, when enabled, can execute Transact-SQL code automatically when rows in the table are inserted, updated, or deleted?
|
A DML trigger
|
|
With Change Tracking, which column of the change-tracked table is captured along with the change information?
|
The primary key of the change-tracked table
|
|
Which clause must you include in a CREATE PROCEDURE statement to create a CLR stored procedure?
|
The EXTERNAL NAME clause
|
|
When must columns specified in an ORDER BY clause be included in the SELECT list of the query?
|
When the DISTINCT keyword, a GROUP BY clause, or the UNION operator is used
|
|
What is the result of setting IMPLICIT_TRANSACTIONS to ON?
|
Transactions are implicitly created when specific SQL statements are encountered and no transaction is active, but must be explicitly committed or rolled back.
|
|
What is the result of including an empty set in a grouping set?
|
Grand totals are returned.
|
|
Which join allows you to join a table to itself by specifying the table name twice in the FROM clause with different table aliases?
|
A self join
|
|
Which type of trigger is executed in place of the statement that fires it, but before any table constraints are checked?
|
An INSTEAD OF trigger
|
|
Which SQL Server monitoring tool can be used to capture SQL Server activity in a trace?
|
SQL Server Profiler
|
|
When including an OUTPUT clause in a DML statement, in which three ways can the information about the affected rows be used?
|
It can be displayed to the user, inserted into a permanent or temporary table, or passed to a nested DML statement for processing.
|
|
Which system stored procedure is used to update an existing Database Mail account?
|
The sysmail_update_account_sp system stored procedure
|
|
For an UPDATE statement that includes an OUTPUT clause, which column value is returned by a column prefixed with DELETED?
|
The column value that existed before the DML operation
|
|
What are the three types of secondary XML indexes?
|
Path, Value, and Property
|
|
Which system stored procedure returns details about a previously created Database Mail profile?
|
The sysmail_help_profile_sp system stored procedure
|
|
Which function should you use in the FROM clause to provide a rowset view over an XML document?
|
The OPENXML function
|
|
Which type of join is performed when the JOIN keyword is used without the LEFT, RIGHT, FULL, or CROSS keyword?
|
An inner join
|
|
What is the result of specifying the COLLATE database_default clause for a column when creating a table?
|
The default collation for the database in which the object is created is used.
|
|
When multiple columns are specified in the ORDER BY clause, how is the result set sorted?
|
First by the column specified first in the ORDER BY clause, then by the second specified column, and so on
|
|
When performing inserts, updates, deletes, and merges, which clause can you include to return information about the rows affected by the DML operation?
|
The OUTPUT clause
|
|
Which clause is used in a procedure or function definition to specify the security context under which the procedure or function will execute?
|
The EXECUTE AS clause
|
|
When defining a Common Table Expression (CTE), which clause specifies the expression name that will be used in the subsequent statement?
|
The WITH clause
|
|
Which clause can you include with a GROUP BY clause to group rows in the result set based on values in the GROUP BY clause, return one summary row for each group, and return a grand total summary row?
|
The WITH ROLLUP clause
|
|
Which constraint type identifies a column or set of columns that uniquely identify any given row of data in a table, and cannot contain a NULL value?
|
A PRIMARY KEY constraint
|
|
Which data type should you use to store rows of data from a result set so they can be processed later?
|
The table data type
|
|
At which level must a CHECK constraint be defined to be able to reference more than one column in the constraint expression?
|
At the table level
|
|
Which logical operator returns a TRUE value if the value of a test expression is equal to the value of one of the values in a specified list?
|
The IN operator
|
|
With Change Tracking, which column can you specify in a query to identify the type of DML statement that generated the change?
|
The SYS_CHANGE_OPERATION column
|
|
Which clause of the CREATE VIEW statement ensures that the statement creating the view is not stored in the database in plain text and readable by others?
|
The WITH ENCRYPTION clause
|
|
What is the result if you issue a DELETE statement that does not include a WHERE clause?
|
All the rows in the table are deleted.
|
|
Which clause should you use in a SELECT query if you only want to retrieve the first 15 rows from the result set?
|
The TOP 15 clause
|
|
Which clause of the MERGE statement specifies the action to take when the records from the source table are in the target table?
|
The WHEN MATCHED THEN clause
|
|
If you create a database and specify a database collation that is different from the server collation, for which objects created in the database will this collation be used?
|
All permanent objects for which you have not explicitly overridden the collation at the column level
|
|
What is the result of specifying the WITH STATUS=OFF clause with the CREATE QUEUE statement?
|
The queue will not be able to receive messages.
|
|
Which join should be used to return the rows that exist in both tables along with the rows that exist only in the table to the right of the JOIN keyword?
|
A right outer join
|
|
Which Transact-SQL statement uses two tables and can insert, update, or delete rows in one of the tables based on the other table's rows?
|
The MERGE statement
|
|
After using Database Engine Tuning Advisor to make recommendations, what is the result of selecting Save Recommendations from the Actions menu?
|
A Transact-SQL script that could be used to implement the recommendations is created.
|
|
For an UPDATE statement that includes an OUTPUT clause, which column value is returned by a column prefixed with INSERTED?
|
The column value that exists after the DML operation is complete, but before any table triggers are executed
|
|
Which three parameters must be specified with the DATEDIFF function?
|
The starting date, the ending date, and the portion of the date to use to calculate the difference
|
|
To use the UNION operator to combine the result sets of several SELECT statements, what must be true of the columns in the result sets of the individual SELECT statements?
|
Each result set must have the same number of columns in the same order, and the data types of the corresponding columns must be compatible.
|
|
To what does the term dirty reads refer?
|
When statements read rows that have been modified by other transactions but have not yet been committed
|
|
Which option can be used with the FOR XML clause to include a root element with a specific name?
|
The ROOT option
|
|
Which ranking function assigns a numerical ranking to rows, but does not skip rankings if two rows have an identical value in the ranking column?
|
The DENSE_RANK function
|
|
Which value is an IDENTITY column assigned by default when a row is inserted?
|
The next identity value
|
|
What is returned by the sp_helptext system stored procedure for a stored procedure created with the WITH ENCRYPTION clause?
|
An error message indicating the stored procedure is encrypted
|
|
Which SET option should you include in an ALTER DATABASE statement to enable change tracking?
|
The SET CHANGE_TRACKING=ON option
|
|
Which type of join creates a Cartesian product of two tables, joining each row in one table with all possible rows from the other table?
|
A cross join
|
|
Which clause should you include in a SELECT query with a GROUP BY clause to restrict the rows returned by using an expression after the grouping?
|
The HAVING clause
|
|
Which database object would you create to accept input parameters and execute Transact-SQL code without returning a value?
|
A stored procedure
|
|
Which constraint type can ensure that the non-NULL values in a given column will match values in column of another table?
|
A FOREIGN KEY constraint
|
|
What can each grouping set specified in a GROUPING SETS clause contain?
|
One or more columns or an empty set
|
|
Which clause should you include with the OUTPUT clause of a DML statement to store information about rows affected by the statement in another permanent or temporary table?
|
The INTO clause
|
|
When a user references a view in a query, how is the data from the underlying tables or views retrieved?
|
Using the SELECT statement that defines the view
|
|
What syntax is used to create a computed column in a table?
|
The column_name AS expression syntax
|
|
Which clause of the CREATE PARTITION FUNCTION statement specifies the boundary values of each partition?
|
The FOR VALUES clause
|
|
Which Transact-SQL function returns an integer representing a portion of a specified date, such as the month, day, or year?
|
The DATEPART function
|
|
On which columns can an XML index be created?
|
On a single xml data type column in a database table
|
|
Which query hint specifies an integer value that identifies the number of processors on which a single query may run, and can be used to override the max degree of parallelism configuration option for a single query?
|
The MAXDOP query hint
|
|
When creating a stored procedure, which clause specifies that the stored procedure executes under the security context of the current user?
|
The EXECUTE AS SELF clause
|
|
Which keyword should be used with the FOR XML clause to retrieve nested XML results that use table names as elements and column names as attributes?
|
The AUTO keyword
|
|
When specified with the UNION operator, which keyword specifies that every row of the individual SELECT statement result sets, including duplicate rows, should appear in the final result set?
|
The ALL keyword
|
|
Which statement ends the current transaction by discarding all pending data changes?
|
The ROLLBACK TRANSACTION statement
|
|
Which clause should you use in a SELECT query if you only want to retrieve the first 10 percent of rows from the result set?
|
The TOP 10 PERCENT clause
|
|
Which type of triggers fire when database schema changes are made?
|
DDL triggers
|
|
Which tool can you use to identify missing clustered indexes that might improve the performance of your Transact-SQL queries?
|
The Database Engine Tuning Advisor
|
|
What is the result of issuing a TRUNCATE TABLE statement?
|
All rows are removed from the table, but the table's definition is retained.
|
|
Which statement allows you to move a partition from one partitioned table to another partitioned table?
|
The ALTER TABLE...SWITCH statement
|
|
Which catalog view returns a row for each SQL Server trace event, including the numeric identifier of the trace, the identifier for the trace's category, and the trace's name?
|
The sys.trace_events catalog view
|
|
When a Common Table Expression (CTE) definition references itself, which query hint can you include with the query following the CTE definition to limit the levels of recursion for the CTE?
|
The MAXRECURSION query hint
|
|
Which database's collation is used by default if you create a temporary table and do not override the collation at the table level?
|
The collation defined in the tempdb database
|
|
Which columns in a table can the CONTAINS and FREETEXT predicates reference?
|
Either a single column enabled for full-text search or all of the columns that are enabled for full-text search
|
|
Which type of index should you create on a column when you want to perform keyword searches on the column?
|
A full-text index
|
|
Which catalog view returns a row for each current trace along with its status, but not the trace's details?
|
The sys.traces catalog view
|
|
Which data type can be used to store data of different data types, such as int, binary, and char, within a single column?
|
The sql_variant data type
|
|
Which clause should you include in an ALTER PARTITION FUNCTION statement to merge two partitions?
|
The MERGE RANGE (boundary_value) clause
|
|
Which Transact-SQL function returns a specific number of characters from a specified character string, beginning at a specified position?
|
The SUBSTRING function
|
|
Which clause of the ALTER TABLE statement should you use to change the data type or size of an existing column?
|
The ALTER COLUMN clause
|
|
Which two conditions must be true to catch an execution error using a TRY...CATCH construct?
|
The execution error must not terminate the database connection and must have a severity level greater than 10.
|
|
Which system stored procedure accepts parameters defining the details of an e-mail message, such as the recipients, message subject, message body, and importance, and sends the e-mail message using Database Mail?
|
The sp_send_dbmail system stored procedure
|
|
Which clause of the CREATE PARTITION SCHEME statement identifies the partition function?
|
The AS PARTITION clause
|
|
When creating a secondary XML index, which clause of the CREATE XML INDEX statement specifies the name of the primary XML index defined for the column?
|
The USING XML INDEX clause
|
|
To round a specified column, expression, or value to the nearest whole number, which value should you pass as the second argument to the ROUND function?
|
A value of 0
|
|
When using the OPENXML function, which flag parameter value indicates that element-specific mapping should be performed instead of attribute-specific mapping?
|
A flag parameter value of 2
|
|
When creating a temporary table, which collation will be used by default?
|
The collation defined in the tempdb database, which after each server restart is the same as the server's collation
|
|
Which data type is used to store XML data, such as XML documents or XML document fragments?
|
The xml data type
|
|
Which clause of the SELECT statement allows you to insert the result set returned into a new table?
|
The INTO clause
|
|
When enabling change tracking using the ALTER DATABASE statement, what does an AUTO_CLEANUP value of ON indicate?
|
That change tracking information will be automatically deleted from the database after the retention period specified by CHANGE_RETENTION
|
|
Which type of parameters allow you to pass multiple rows of data into a stored procedure or user-defined function?
|
Table-valued parameters
|
|
Which two transaction isolation levels prevent phantom reads and dirty reads?
|
The SNAPSHOT and SERIALIZABLE transaction isolation levels
|
|
Which operator evaluates two queries and returns a single result set containing all rows returned from the first query that are not also returned by the second query?
|
The EXCEPT operator
|
|
Is Database Mail enabled or disabled by default?
|
Disabled
|
|
Which constraint type specifies that a given row cannot contain NULL values?
|
A NOT NULL constraint
|
|
Which Transact-SQL statement registers an XML schema in the database?
|
The CREATE XML SCHEMA COLLECTION statement
|
|
Which term refers to a user-defined function that returns a single scalar value?
|
A scalar-valued function
|
|
Which full-text search predicate is used to search by the criteria that are explicitly defined in the search conditions?
|
The CONTAINS predicate
|
|
Which operator evaluates to TRUE if the comparison is true for at least one value returned by the subquery?
|
The ANY operator
|
|
Which system stored procedure associates a previously created Database Mail profile with a previously created Database Mail account?
|
The sysmail_add_profileaccount_sp system stored procedure
|
|
Which system stored procedure creates a Database Mail account?
|
The sysmail_add_account_sp stored procedure
|
|
When inserting a value into a table, which columns must you specify in the INSERT statement?
|
All columns that require a value and have no default defined, except a column with the IDENTITY property or a computed column
|
|
Within a DDL trigger, which statement can you include to cancel the DDL operation that fired the trigger?
|
A ROLLBACK statement
|
|
Which three actions should you take to create a CLR stored procedure?
|
Define and compile a static class method within the .NET Framework language, register the assembly in SQL Server with the CREATE ASSEMBLY statement, and specify the EXTERNAL NAME clause in a CREATE PROCEDURE statement to reference the method
|
|
Which Transact-SQL statement is used to define the type of data that can be sent and received in a conversation, and can be subsequently allowed or disallowed in a contract?
|
The CREATE MESSAGE TYPE statement
|
|
What does a partition function do?
|
It maps the rows of a table or index into partitions based on the specified partition boundary values.
|
|
Which query hint can you specify to force recompilation and generation of a new execution plan each time the query is executed?
|
The RECOMPILE query hint
|
|
Which action should you take to modify the fill factor of all indexes subsequently created or rebuilt in the database?
|
Use the sp_configure system stored procedure to set the fill factor option.
|
|
Which permission set value is the most restrictive and prevents access to external files, the registry, and unmanaged code?
|
SAFE
|
|
Which operator only evaluates to TRUE if the comparison is true for every value returned by the subquery?
|
The ALL operator
|
|
Which statement should you execute to allow specific values to be inserted into a column that has the IDENTITY property?
|
The SET IDENTITY_INSERT table_name ON statement
|
|
When using the CONTAINSTABLE or FREETEXTTABLE function, what does the Key column of the result table contain?
|
The value of the column defined as the full-text key column in the base table
|
|
When using the LIKE operator, what does the percent sign (%) wildcard character indicate?
|
Any character(s) or no character
|
|
To send mail using SMTP instead of having an Extended MAPI client installed on the server, should you use SQL Mail or Database Mail?
|
Database Mail
|
|
Which clause of the CREATE QUEUE statement can you specify to identify a stored procedure that should automatically process incoming messages for the queue?
|
The ACTIVATION clause
|
|
Which method is used to retrieve a value of SQL type from an XML instance?
|
The value() method
|
|
Before creating a stored procedure that accepts a table-valued input parameter, which statement must you execute first?
|
The CREATE TYPE...AS TABLE statement
|
|
Which Service Broker object stores a service's incoming messages?
|
A queue
|
|
Which clause should be used with a FOREIGN KEY constraint to ensure that if a row in the parent table is deleted, all referenced rows in the child table are also deleted?
|
The ON DELETE CASCADE clause
|
|
When using an OUTPUT clause with a MERGE statement, which function can you use to return the type of action that occurred for the row?
|
$action
|
|
Which statement can you use to create a primary XML index on an xml data type column?
|
The CREATE PRIMARY XML INDEX statement
|
|
On which data types can full-text indexes be created?
|
The char, varchar, nvarchar, and varbinary(max) data types
|
|
Which data type represents data in a round-earth coordinate system, such as latitude and longitude coordinates?
|
The geography data type
|
|
Which Transact-SQL function returns the position of the first occurrence of a given text pattern within a text string?
|
The PATINDEX function
|
|
When an UPDATE statement is issued against a table that has an INSTEAD OF UPDATE trigger, which system table can be used to access the row values before the update?
|
The deleted system table
|
|
Which dynamic management function returns one row for each database entity that is referenced within a user-defined function or stored procedure?
|
The sys.dm_sql_referenced_entities dynamic management function
|
|
What is the basic syntax to define a Common Table Expression (CTE)?
|
WITH expression_name [(column_name [,...n])] AS (CTE_query_definition);
|
|
Which two Service Broker object names are specified when creating a service?
|
The queue name and the contract name
|
|
When creating a computed column in a table, which four items may be referenced in the expression that defines the column's calculation?
|
Constants, functions, operators, and references to other columns within the table
|
|
What is the result of specifying WITH TIES in a SELECT statement that includes the TOP keyword?
|
All rows that have a value equal to the last row returned by the TOP keyword are also returned.
|
|
When you create a stored procedure that accepts a table-valued input parameter, which clause must you include for the parameter in the parameter list?
|
The READONLY clause
|
|
Which Service Broker object defines the type of data that can be sent and received in a conversation?
|
A message type
|
|
Which term describes an index that is physically separate from the table data and contains ordered pointers to the table data?
|
A nonclustered index
|
|
Which prefix is not allowed in a DELETE statement's OUTPUT clause?
|
The INSERTED prefix
|
|
How many primary XML indexes can a XML column have in a table?
|
One
|
|
Which full-text indexing component is used to eliminate specific noise words from the full-text index?
|
A stoplist
|
|
How many primary XML indexes can you create on a single xml data type column?
|
Only one
|
|
Which clause should you include in a CREATE VIEW or ALTER VIEW statement to ensure that no data modifications can be made through the view that would cause the underlying data to violate the view definition?
|
The WITH CHECK OPTION clause
|
|
Which statement would you use to transfer the data from the first partition of the Sales table into the second partition of the Sales2 table?
|
ALTER TABLE Sales SWITCH PARTITION 1 TO Sales2 PARTITION 2;
|
|
What must exist to successfully create a secondary XML index on an xml column?
|
A primary XML index for the same column
|
|
Which PowerShell cmdlet displays all objects for the current node?
|
The Get-ChildItem cmdlet
|
|
Which keyword should you include in the ORDER BY clause to sort date values from latest to earliest?
|
The DESC keyword
|
|
When using WITH ROLLUP and WITH CUBE, how can aggregate rows be identified in the result set?
|
They will have NULL values for one or more of the columns in the GROUP BY clause.
|
|
When must a subquery in a WHERE clause return a single scalar value to avoid generating an error?
|
When the WHERE clause condition uses a single-row operator, such as >, <, >=, or <=
|
|
Which Transact-SQL function returns a specified number of characters from the left-hand side of a specified character string?
|
The LEFT function
|
|
To what value does NOT EXISTS evaluate if the subquery returns no rows?
|
TRUE
|
|
Which transaction isolation level is the default?
|
The READ COMMITTED transaction isolation level
|
|
Which clause should you include in an ALTER TABLE statement to temporarily disable a FOREIGN KEY or CHECK constraint?
|
The NOCHECK CONSTRAINT clause
|
|
To pass the value of an output parameter to an external variable, which keyword must be specified in the statement that calls the procedure?
|
The OUTPUT keyword
|
|
Which keyword is used to begin a Transact-SQL query that uses a Common Table Expression (CTE)?
|
The WITH keyword
|
|
What is the result of specifying the DEFAULT contract type when creating a service?
|
Both sides of conversations can send and receive DEFAULT message types.
|
|
Which three sources can the Database Engine Tuning Advisor use as a workload?
|
A Transact-SQL script, a trace file, or a trace table
|
|
What do the RANGE LEFT and RANGE RIGHT clauses of the CREATE PARTITION FUNCTION statement specify?
|
Whether a boundary value should be stored in the partition on the right side or left side of the boundary
|
|
Which data type represents data in a Euclidean or flat coordinate system?
|
The geometry data type
|
|
Which XML method is used to shred an XML data type instance into relational data?
|
The nodes() method
|
|
Which option can you set to ON to return information about the logical, physical, and read-ahead reads for subsequent queries?
|
The STATISTICS IO option
|
|
Which XML method is used to query and retrieve XML nodes from an XML instance?
|
The query() method
|
|
What is the maximum number of clustered indexes that can be created on a single table?
|
One
|
|
Which dynamic management view can you query to return the session ID of blocking sessions in the database?
|
The sys.dm_exec_requests dynamic management view
|
|
Which ranking function divides the result set or each partition into a specified number of groups?
|
The NTILE function
|
|
Which parameter of the sp_addmessage system stored procedure identifies the error number?
|
The @msgnum parameter
|
|
Which data type stores only a date in YYYY-MM-DD format?
|
The date data type
|
|
When querying the sys.dm_os_wait_stats dynamic management view, what does a high wait_time_ms value for the SOS_SCHEDULER_YIELD wait type indicate?
|
A CPU bottleneck
|
|
In which clause of a SELECT statement can the CONTAINSTABLE and FREETEXTTABLE functions be used?
|
The FROM clause of a SELECT statement
|
|
If you create a view including the WITH CHECK OPTION clause, what is the result if a user attempts to modify data through the view that would cause data to violate the view definition?
|
The user's statement returns an error, and the data is not modified.
|
|
Which full-text search predicate initiates a search using the criteria that are dynamically generated by parsing the text specified as the search condition?
|
The FREETEXT predicate
|
|
Which statement will you use to complete a transaction successfully, make any data changes permanent, and release all locks associated with the transaction?
|
The COMMIT TRANSACTION statement
|
|
How can you create a self-referencing relationship for a table?
|
Create a FOREIGN KEY constraint on one column of the table that references another column in the table.
|
|
When creating a stored procedure, which clause causes the stored procedure to be recompiled each time it is run?
|
The WITH RECOMPILE clause
|
|
Which clause can you include when creating a full-text index to override the system stoplist and explicitly specify a custom stoplist to use with the full-text index?
|
The WITH STOPLIST clause
|
|
What does the COLLATE clause of a CREATE TABLE or CREATE VIEW statement do?
|
It explicitly sets the collation for the table or view.
|
|
When enabling change tracking using an ALTER DATABASE statement, what does the CHANGE_RETENTION value specify?
|
The length of time that change tracking information should be kept in the database
|
|
Which Transact-SQL statement is used only to modify values in an existing table?
|
The UPDATE statement
|
|
What does the @@ERROR function return?
|
Either the error number of the error generated by the most recently executed Transact-SQL statement or zero if the statement did not generate an error
|
|
In SQL Server Management Studio, which action can you take to view the graphical execution plan used for a query?
|
After executing the query, click the Include Actual Execution Plan button on the query editor toolbar.
|
|
In which clause of a SELECT statement are the CONTAINS and FREETEXT predicates typically used?
|
The WHERE clause
|
|
Which Transact-SQL statement removes a column containing data from an existing table without affecting data stored in other columns?
|
The ALTER TABLE...DROP COLUMN statement
|
|
Which collation is used if no collation is specified at the database, column, or expression level?
|
The collation set at the server during setup
|
|
Which join should be used to return the rows that exist in both tables along with the rows that exist only in the table to the left of the JOIN keyword?
|
A left outer join
|
|
Which index must exist on a table before an XML index can be created on it?
|
A primary key clustered index
|
|
Which system stored procedure should you call to obtain a document handle to pass to the OPENXML function?
|
The sp_xml_preparedocument system stored procedure
|
|
Which PowerShell cmdlet should you use to position to a specific node?
|
The Set-Location cmdlet
|
|
How is explicit collation assigned?
|
By including a COLLATE clause in the expression
|
|
Which system stored procedure is provided to generate a user-configurable event that can be traced in the SQL Profiler?
|
The sp_trace_generateevent system stored procedure
|
|
Which keyword can you use with the SELECT statement to specify that the result set should suppress duplicates and return only unique rows?
|
The DISTINCT keyword
|
|
Which syntax is used to create a partition scheme?
|
CREATE PARTITION SCHEME partition_scheme AS PARTITION partition_function [ALL] TO ({file_group | [PRIMARY]} [,...n]);
|
|
Which Service Broker object specifies how Service Broker will locate services on other computers or in other databases?
|
A route
|
|
When using the CHANGETABLE function in the FROM clause of a SELECT statement, is a table alias required or optional?
|
Required
|
|
What is the syntax of a basic UPDATE statement?
|
UPDATE tablename SET colname_1 = {expression | DEFAULT | NULL}, colvalue_1 [,...colname_n = {expression | DEFAULT | NULL}] WHERE condition;
|
|
Which two functions can you use to perform a full-text search?
|
The CONTAINSTABLE and FREETEXTTABLE functions
|
|
What defines a data value to be assigned automatically to a column if the user does not specify a value for the column when adding a record?
|
A DEFAULT definition
|
|
Which parameter of the sp_addmessage system stored procedure specifies the custom error message text to be displayed when the error is raised?
|
The @msgtext parameter
|
|
Which statement can you use to create a custom stoplist named CustomStop from the system stoplist?
|
CREATE FULLTEXT STOPLIST CustomStop FROM SYSTEM STOPLIST;
|
|
What is the syntax used to create a primary XML index on an xml data type column?
|
CREATE PRIMARY XML INDEX indexname ON tablename(colname);
|
|
Which operator should you use to create a single result set consisting of results from two SELECT statements, but excluding duplicates?
|
The UNION operator
|
|
Which Service Broker object specifies the message types that can be sent and received between two targets and the conversation participants that can send messages?
|
A contract
|
|
Which function can be used within the body of a DDL trigger to return information on the event that caused the trigger to fire, such as the name of the instance on which the event was fired, the Transact-SQL statement that caused the event to fire, and the type of event that was fired?
|
The EVENTDATA function
|
|
Which XML method is used to determine if the query returns a nonempty result?
|
The exist() method
|
|
Which clause can be used with the GROUP BY clause to explicitly specify the groups for which aggregate information should display, and allows you to use multiple groupings within a single query?
|
The GROUPING SETS clause
|
|
Which Transact-SQL function can be used to calculate the time interval between two specified dates?
|
The DATEDIFF function
|
|
When creating a Service Broker application, which Service Broker object specifies the queue in which to store messages and a contract defining the type of messages that can be sent and received?
|
A service
|
|
Which clause is used to specify the columns by which rows must be grouped when aggregate functions are included in the SELECT list?
|
The GROUP BY clause
|
|
Which two fill factor values indicate that leaf-nodes will be filled completely when the index is created or rebuilt?
|
A fill factor value of 100 or 0
|
|
When using the OPENXML function, what does the row pattern indicate?
|
The name of the node from which to begin processing
|
|
Which query hint can you specify to optimize queries based on a specific value for a local variable used in the query?
|
The OPTIMIZE FOR query hint
|
|
What is the result of including CHANGETABLE(CHANGES Employee, NULL) in the FROM clause of a SELECT statement?
|
A result set is used that contains information on rows that changed to the Employee table within the change tracking retention period.
|
|
Which query hint can you specify to quickly retrieve a specified number of rows, and return the remainder of the result set when the query completes?
|
The FAST query hint
|
|
When using an OUTPUT clause in a DML statement, which two prefixes can you use to retrieve information about the columns affected by the DML operation?
|
The INSERTED and DELETED prefixes
|
|
Which statement within the body of a user-defined function returns a value to the caller?
|
The RETURN statement
|
|
Which dynamic management function returns one row for each database entity that references another specified entity, such as a user-defined function or stored procedure?
|
The sys.dm_sql_referencing_entities dynamic management function
|
|
Which keyword should you include in your CREATE TABLE or ALTER TABLE statement for a computed column if you want the column's values to be physically stored in the table?
|
The PERSISTED keyword
|
|
Which dynamic management function should you use in the FROM clause of a query to extract information stored in a trace file for a specific time period?
|
The fn_trace_gettable dynamic management function
|
|
What does the default TRUSTWORTHY database property value of OFF indicate?
|
That user-defined functions or stored procedures that use an impersonation context cannot access external resources
|
|
Which features should you use to capture historical changes to a table over time, including the data values that changed?
|
The Change Data Capture feature
|
|
Which clause of the MERGE statement specifies the action to take when the records from the source table are not in the target table?
|
The WHEN NOT MATCHED THEN clause
|
|
In which two ways can you enable FILESTREAM to be able to create a table that can store FILESTREAM data, such as image and video files?
|
Using SQL Server Configuration Manager or using the sp_configure system stored procedure
|
|
Which aggregate function returns the number of rows in the specified rowset, including null values and duplicates?
|
The COUNT(*) function
|
|
Which command-line utility is used to incorporate Database Engine Tuning Advisor functionality with scripting?
|
The dta.exe utility
|
|
Which three Transact-SQL statements prevent subsequent queries from being executed, and instead return execution plan information for the queries?
|
The SET SHOWPLAN_TEXT ON, SET SHOWPLAN_ALL ON, and SET_SHOWPLAN_XML ON statements
|
|
Which five steps must you perform to pass a table-valued variable to a user-defined stored procedure?
|
Create a user-defined data type, create the stored procedure that accepts a table parameter, declare a variable of the user-defined data type, initialize the variable, and pass the variable as an input parameter to the stored procedure.
|
|
Which clause can be included with the GROUP BY clause to return a summary row for each possible combination of columns in the GROUP BY clause?
|
The WITH CUBE clause
|
|
After you create a Common Table Expression (CTE), which statement or statements reference the CTE expression by name as if it were a table or view?
|
Only the statement immediately following the CTE definition
|
|
For what purpose is a full-text filter that implements the iFilter interface used?
|
To extract text information from a varbinary, varbinary(max), image, or xml data type column based on the documents extension to be able to index the column for full-text searches
|
|
Which transaction isolation level, SNAPSHOT or SERIALIZABLE, consumes the most system resources and increases the possibility of blocking?
|
The SERIALIZABLE isolation level
|
|
Which type of join combines two tables and returns all rows with matching values in the joining column or columns, as well as rows from either table that contain NULL values in the joining column or columns?
|
A full outer join
|
|
If you include EXECUTE AS CALLER when creating a stored procedure, what permissions must a user calling the procedure have been granted to successfully execute the procedure?
|
Permissions on the stored procedure and permissions on any underlying database objects referenced by the stored procedure
|
|
Which clause should you specify in a CREATE VIEW statement if you do not want users to be able to drop base tables or modify base tables in a way that affects the view?
|
The WITH SCHEMABINDING clause
|
|
Which data type stores only a time in hh:mm:ss.nnnnnnn format?
|
The time data type
|
|
Which clause can be used with the CREATE FUNCTION statement to ensure that objects referenced by the new function cannot be altered or dropped until the function is altered or dropped?
|
The WITH SCHEMABINDING clause
|
|
Which Transact-SQL function searches for a given character string within another string and returns the search string's starting position in the other string, if found?
|
The CHARINDEX function
|
|
Which two predicates can you use to perform a full-text search?
|
The CONTAINS and FREETEXT predicates
|
|
What is the result if you attempt to insert data that violates a CHECK constraint into a table, but the constraint is disabled?
|
The constraint condition is ignored, and the data is inserted.
|
|
Which parameter of the sp_addmessage system stored procedure should you specify to create a custom error message that will display in another language?
|
The @lang parameter
|
|
When you create a custom error message with the sp_addmessage system stored procedure, where is the custom error message stored?
|
The sysmessages table in the master database
|
|
Which provider allows you to access the hierarchy of SQL Server objects by using a drive and path structure similar to Windows file system?
|
The SQL Server PowerShell provider
|
|
For what purpose would you include the IDENTITY property for a column when creating a table?
|
To create a column that will automatically be assigned unique, incremental integer values as rows are inserted into the table
|
|
When creating a table, which column definition should you use to create a column named Picture that can contain FILESTREAM data?
|
Picture varbinary(max) FILESTREAM
|
|
When using a row constructor to insert multiple rows of data into a table, what is the result if one of the lines in the VALUES clause fails?
|
The entire INSERT statement fails, and no rows are inserted.
|
|
For what purpose would you include the COLLATE clause in a CREATE DATABASE statement?
|
To create a database with a different collation than the server's collation
|
|
Which type of storage is used to store large binary objects, such as image or video files, as files on the file system?
|
FILESTREAM storage
|
|
Which parameter of the sp_addmessage system stored procedure identifies the error's severity level?
|
The @severity parameter
|
|
Which execution error severity levels are considered informational messages and cannot be caught using a TRY...CATCH construct?
|
Severity levels 0 through 10
|
|
What is the result of issuing the RAISERROR(60000, 16, 1, 1, 2); statement?
|
The error message associated with error number 60000 in the sysmessages table is displayed with the values 1 and 2 substituted for the error's first two substitution parameters.
|
|
Which term refers to a user-defined function that returns a value of the table data type?
|
A table-valued function
|
|
Which database object should you use if you have a third-party application that accesses a table, and schema changes are required that might break the application?
|
A view
|
|
Which function can you call within a CATCH block to retrieve the name of the stored procedure or trigger that generated the error?
|
The ERROR_PROCEDURE() function
|
|
Which transaction isolation level is the least restrictive, and consumes the fewest system resources?
|
The READ UNCOMMITTED isolation level
|
|
Which GROUP BY clause syntax is used with grouping sets to specify multiple groupings within a single query?
|
GROUP BY GROUPING SETS (groupingset1 [,...groupingsetn])
|
|
Which constraint type enforces data uniqueness for a column and will allow only a single NULL value for the column?
|
A UNIQUE constraint
|
|
After executing the SET SHOWPLAN_XML ON statement, what is the result on subsequent Transact-SQL statements?
|
SQL Server will not execute subsequent Transact-SQL statements, but will return well-formed XML containing execution plan information for the statements.
|
|
Which operator would you use to display rows with a value that falls within a range of specified values?
|
The BETWEEN...AND operator
|
|
Which constraint type applies a Boolean condition to data that is entered in a column and either allows or disallows the data based on the conditional result?
|
A CHECK constraint
|
|
For what purpose would you create a trace template?
|
To easily create multiple traces with the same characteristics
|
|
Does EXISTS evaluate to TRUE or FALSE if one or more rows are returned by the subquery?
|
TRUE
|
|
Which data type should you use to store variable-length Unicode character data?
|
The nvarchar data type
|
|
Is FILESTREAM enabled or disabled by default?
|
Disabled
|
|
Which clause in a SELECT statement restricts the rows returned by the query before any grouping occurs?
|
The WHERE clause
|
|
Which join returns only rows that meet the join criteria in the ON clause?
|
An inner join
|
|
Which system stored procedure should you use to create a custom error message?
|
The sp_addmessage system stored procedure
|
|
Which action should you take if you notice that excessive page splitting is occurring for a table?
|
Rebuild the table's indexes decreasing the fill factor.
|
|
Why does using a covering index improve query performance?
|
All the data required for the query can be retrieved directly from the index.
|
|
What is created when you create a unique clustered index on a view?
|
An indexed view
|
|
Which permission set value for assemblies allows access to external system resources, such as the registry or files on the network?
|
EXTERNAL_ACCESS
|
|
How are column names specified when using FOR XML PATH?
|
As XPath expressions
|
|
For a datetimeoffset data type, what does a time zone offset of -5:00 indicate?
|
A date/time with a local time zone that is five hours behind Coordinated Universal Time (UTC)
|
|
Which ranking function returns each row's row number within the returned result set?
|
The ROW_NUMBER function
|
|
How are transactions committed when running in autocommit mode with IMPLICIT_TRANSACTIONS set to OFF?
|
Each DML statement is automatically committed if it executes successfully.
|
|
Which dynamic management view provides information regarding each authenticated session in the SQL server?
|
The sys.dm_exec_sessions dynamic management view
|
|
In a Service Broker application, which Service Broker object must be specified when creating a service?
|
The queue that the service will use to store messages
|
|
Must DDL triggers be created to fire after an event has occurred, or can they fire instead of the triggering event?
|
They can only fire after the triggering event.
|
|
Which data type stores variable-length binary data?
|
The varbinary data type
|
|
Which option should be added to the FOR XML AUTO clause to have columns returned as nested elements rather than as attributes?
|
The ELEMENTS option
|
|
Which statement should you use to map different partitions created by the partition function to filegroups?
|
The CREATE PARTITION SCHEME statement
|
|
Which PowerShell cmdlet displays the current item's properties?
|
The Get-Item cmdlet
|
|
Which three actions must you take to partition a table?
|
Create the partition function, create the partition scheme, and partition the table.
|
|
Which system stored procedure deletes the internal representation of the XML document that was created using the sp_xml_preparedocument system stored procedure?
|
The sp_xml_removedocument system stored procedure
|
|
Which operator returns distinct values that are returned by both the query on the left and right sides the operand?
|
The INTERSECT operator
|
|
Which clause of the CREATE PARTITION SCHEME statement identifies the filegroups?
|
The TO clause
|
|
What are the two basic types of XML indexes?
|
Primary and secondary
|
|
Which full-text indexing component is used to identify synonyms when performing queries containing the FREETEXT predicate or the FREETEXTTABLE function?
|
A thesaurus file
|
|
Which syntax is used to create a partitioned table?
|
CREATE TABLE table_name (coldef1, coldef2, ...) ON partition_scheme (partition_column);
|
|
For which three structures does the Database Engine Tuning Advisor make recommendations?
|
Indexes, indexed views, and partitions
|
|
When nesting transactions, what determines whether the inner transaction is committed or rolled back?
|
Whether the outer transaction is committed or rolled back
|
|
Which ranking function assigns a numerical ranking to rows, but skips a ranking if two rows have an identical value in the ranking column?
|
The RANK function
|
|
Must columns defined using the SPARSE clause be nullable only, non-nullable only, or either nullable or non-nullable?
|
Nullable
|
|
Which mode should be specified in the FOR XML clause in the SELECT statement if a single <row> element must be generated for each row in the result set?
|
The RAW mode
|
|
Which term describes an index that denotes the physical order of data in a table?
|
A clustered index
|
|
Which system stored procedure creates a Database Mail profile that can be used to group related Database Mail accounts?
|
The sysmail_add_profile_sp system stored procedure
|
|
Which data type is similar to datetime but offers greater range and precision?
|
The datetime2 data type
|
|
Which transaction isolation level is the most restrictive, completely isolating transactions from one another and preventing all concurrency side effects?
|
The SERIALIZABLE isolation level
|
|
Which clause in the CREATE FUNCTION statement specifies the data type of the variable that is returned by the function?
|
The RETURNS clause
|
|
Which tool should you use to enable Database Mail?
|
The Database Mail Configuration Wizard
|
|
What is the result of disabling change tracking for the database if one of the database's tables currently has change tracking enabled?
|
The ALTER DATABASE statement fails, and change tracking remains enabled.
|
|
With a datetimeoffset data type, what does the time zone offset portion represent?
|
The difference between Coordinated Universal Time (UTC) and the local time
|
|
When an UPDATE statement is issued against a table that has an INSTEAD OF UPDATE trigger, which system table can be used to access the updated row values?
|
The inserted system table
|
|
Which clause should you include in a CREATE TRIGGER statement to create a trigger that will fire when any user drops a table in the database?
|
The ON DATABASE AFTER DROP_TABLE clause
|
|
When using the CONTAINSTABLE or FREETEXTTABLE function, what does the Rank column of the result table represent?
|
The relevance ranking, with higher values representing matches that are more relevant
|
|
Which feature should you use to capture the fact that rows in a table changed, but not capture the actual changed values?
|
The Change Tracking feature
|
|
When creating a user-defined function or stored procedure, which four values can you specify for the EXECUTE AS clause?
|
SELF, OWNER, CALLER, or a user name
|
|
For which purpose should you use the sysmail_start_sp system stored procedure?
|
To start the necessary Database Mail components and allow e-mail messages to be processed using Database Mail
|
|
With default settings enabled, what is the result of including an IDENTITY column in the column list and VALUES clause of an INSERT statement?
|
The INSERT fails and generates an error.
|