- (Exam Topic 1)
You administer a Microsoft SQL Server instance that will support several databases.
You need to ensure that every new database created has a data type named postalcode that contains the same attributes.
What should you do?
Correct Answer:
D
One option is to create SQL Server user defined data types.
One trick with new databases is to create the objects in the model database, so as new databases are created the user defined data types will automatically be available.
References:
https://www.mssqltips.com/sqlservertip/1628/sql-server-user-defined-data-types-rules-and-defaults/
- (Exam Topic 2)
A database has a Customers table that includes the following fields:
< ><>>< > >< > >< > >>How should you complete the relevant Transact-SQL statement? To answer, drag the appropriate
Transact-SQL segment to the correct location or location. Each TRANSACT-SQL segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Solution:
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 2)
You develop a stored procedure for a wholesale glass manufacturing company. The stored procedure uses a cursor to read all row-based combinations of the following tables:
<>
Correct Answer:
B
FAST_FORWARD specifies a FORWARD_ONLY, READ_ONLY cursor with performance optimizations enabled.
References: https://msdn.microsoft.com/en-us/library/ms180169.aspx
- (Exam Topic 1)
You have a database named Sales that contains the tables shown in the exhibit. (Click the Exhibit button).
< ><>>< > >< > >< > >< > >>< >
Solution:
SELECT C.LastName,
MAX(O.OrderDate) AS MostRecentOrderDate FROM Customers AS C INNER JOIN Orders AS O ON C.CustomerID=O.CustomerID
GROUP BY C.Lastname
ORDER BY MAX (O.OrderDate) DESC
Does this meet the goal?
Correct Answer:
A
- (Exam Topic 2)
You administer a Microsoft SQL Server 2012 database.
The database contains a table named Employee. Part of the Employee table is shown in the exhibit. (Click the Exhibit button.)
< ><>< ><>Unless stated above, no columns in the Employee table reference other tables.
Confidential information about the employees is stored in a separate table named EmployeeData. One record exists within EmployeeData for each record in the Employee table.
You need to assign the appropriate constraints and table properties to ensure data integrity and visibility. On which column in the Employee table should you create a Primary Key constraint for this table?
Correct Answer:
C