SYM 400 Maricopa Community Colleges SQL Triggers Worksheet

User Generated

fnaqrefcq

Computer Science

SYM 400

Maricopa Community Colleges Estrella Mountain Community College

SYM

Description

Start the VM for assignment six. Inside the VM, click Start, type SSMS (to open SQL Server Management Studio), and connect to the instance. Select Databases, then select the AdventureWorksdw2017 database for this assignment.

In this assignment, students will alter and apply the trigger code.

Refer to the "SYM-400 SQL Triggers" resource for complete instructions. Use the AdventureWorks 2017 database to complete this assignment.

Submit a Word document (with screenshots).

APA style is not required, but solid academic writing is expected.

This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful completion.

Unformatted Attachment Preview

SYM-400 SQL Triggers The purpose of this assignment is to alter and apply the trigger code to the Person.Person table in the Adventure Works database. First, amend the trigger code (below) to fire correctly on the "Person.Person" table. Next, apply the trigger code provided below to the "Person.Person" table to track the number of modifications of data for the table. Check that the trigger worked by updating four records in the "Person.Person" table. Create a Word document which includes the altered trigger code, result table, and a screenshot of the fired trigger results. • • • • Add the "Title" 'Mr.' to 'Ken J Sánchez' Add the "MiddleName" 'Timothy' to 'Michael Raheem' Add the "Title" 'Ms.' and change the "MiddleName" to 'Heather' for 'Samantha H Smith' Add the "Title" 'Mrs.' and change the "LastName" to 'Thompson' for 'Lori K Penor' Trigger Code CREATE TRIGGER [].[trgUpdatedColumns] ON [].[] FOR UPDATE AS SET NOCOUNT ON DECLARE @i AS int, @num_cols AS int DECLARE @UpdCols TABLE(ordinal_position int NOT NULL PRIMARY KEY) SET @num_cols = (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '' AND TABLE_NAME = '') SET @i = 1 WHILE @i
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached. Please let me know if you have any questions or need revisions.

Altered Trigg...

Related Tags