6/52 questions · Unlock full access
Q1

You informed that the ID column should be configured as the table’s primary key, which has to be a value that is globally exclusive. When INSERT procedures are executed, the value must be created automatically. The Motivation column should be configured to allow for values from various languages, with a maximum of 600 characters for explaining why a payment was made. The Total column should be configure to contain monetary values, and should not result in computations generating rounding inaccuracies. You need to use the correct data type for the Total column. Solution: You make use of the Float data type. Has the requirement been satisfied?

Q2

A table, named Deals, is referenced by a number of processes that places the information in various databases throughout the business. Data type conversion errors are produced as a result of certain processes not being entirely cognizant of the data types in the Deals table. You need to make sure that, rather than triggering an error, a NULL value is returned for data conversion failure. Solution: You make use of the TRY_CONVERT function in your Transact-SQL statement. Has the requirement been satisfied?

Q3

Your organization’s Sales department has two tables named Clients and Purchases. The Sales department requires an inventory of all client IDs and the date of the last purchase made by each client. This info should be recorded in two columns, named ClientID and LatestPurchaseDate. A specified date has to be returned for clients that have not made any purchases. Your Transact-SQL statement has to include a specific type of JOIN. Solution: You include a CROSS JOIN. Has the requirement been satisfied?

Q4

You have been tasked with changing the current information for a specific column in a table. You will make use of an UPDATE Transact-SQL statement to achieve your goal. You want to specify the name of this column. Solution: You include the SET argument. Has the requirement been satisfied?

Q5

A database in your organization contains two tables, named Development and Assignment. The Development table contains the Developments, DevelopmentName, StartTime, EndTime, and userID columns. The Assignment table contains the Assignments, AssignmentName, ParentAssignmentlD, Developments, StartTime, EndTime, and userID columns. You have been tasked with finding each assignment’s owner using a Transact-SQL statement that returns an assignment’s owner if there is one present. In the event that an assignment is not owned, but is linked with a development where an owner is present, the owner of the development should be returned. Instances that do not meet this criteria should return a value of -1. You need to create a Transact-SQL statement that meets the requirements. Solution: You include the COALESCE expression in your Transact-SQL statement. Has the requirement been satisfied?

Q6

You have a Microsoft SQL Server database that contains the table shown in the exhibit below. You need to create a report that lists the CustomerName for all customers and the OrderDate for the orders that they may have placed. The customer has not placed any orders yet, only the CustomerName must be listed. Which Transact-SQL query should you use? To answer, drag the appropriate Transact-SQL segment to the correct locations in the answer area. You may ned to drag the splut bar between panes or scroll to view content.

Question image