Explore BrainMass
Share

Explore BrainMass

    Trigger - Update item price in SQL server 2008

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Trigger - Update item price in SQL server 2008

    I need to create a trigger that will update only the price column for all 20 items in the table with its new price and this need to be executed all at one time.

    The table name is: dbo.ITEM, column name is : price

    I have provided a screen shot of the table.

    © BrainMass Inc. brainmass.com October 10, 2019, 5:00 am ad1c9bdddf
    https://brainmass.com/computer-science/sql/trigger-update-item-price-sql-server-2008-488318

    Attachments

    Solution Preview

    ** Please see the attached file for the complete solution **

    --Trigger - Update item price in SQL server 2008
    --Trigger - Update item price in SQL server 2008
    --
    --I need to create a trigger that will update only the price column for all 20 items in the table with its new price and this need to be executed all at one time.
    --
    --The table name is: dbo.ITEM, column name is : price
    --
    --I have provided a screen shot of the table.

    IF EXISTS (SELECT * FROM ...

    Solution Summary

    In this solution we create a trigger.

    $2.19