Which Transact SQL query should you use? You develop a Microsoft SQL - ProProfs Discuss
Advertisement

Which Transact-SQL query should you use? You develop a Microsoft SQL server 2012 database that contains a table named customers. This table has two columns mobile number and home number per each customer. You need to create an audit record only when either the mobile number or home number column is updated.
A. Create trigger trgphonenumberchangeon customers for updates columns_updated (home number, mobile number)- - create audit records.
B. Create trigger trgphonenumberchangeon customers for updates exists( select the home number from inserted) or exists (select mobile number from inserted)- - create audit records.
C. Create trigger trgphonenumberchangeon customers for updates columns_changed (home number, mobile number)- - create audit records.
D. Create trigger trgphonenumberchangeon customers for updates update (home number) or update (mobile number)- - create audit records



Asked by Asgari.sematec, Last updated: Apr 24, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

asgari.sematec

asgari.sematec

asgari.sematec
Asgari.sematec

Answered Aug 07, 2018

CREATE TRIGGER TrgPhoneNumberChange ON Customers FOR UPDATE AS IF UPDATE (HomeNumber) OR UPDATE (MobileNumber) - - Create Audit Records
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.