Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1009417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:55:32+00:00 2026-05-16T08:55:32+00:00

If I have a simple table and I want to do something (say ..

  • 0

If I have a simple table and I want to do something (say .. execute a stored procedure) when a column (and I know the column I wish to look for) has changed.

Is this possible?

Version: SQL Server 2008 R2.

Example table :-

ID INTEGER PRIMARY KEY
Name NVARCHAR(100) NOT NULL
Age TINYINT NOT NULL
HairColour TINYINT NOT NULL

So .. if the content of the Name field changes, then I will execute stored procedure ‘Foo’.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:55:33+00:00Added an answer on May 16, 2026 at 8:55 am

    Use:

    CREATE TRIGGER trig_updateName ON YOUR_TABLE
    
    FOR UPDATE AS
    
      IF NOT UPDATE(Name) 
      BEGIN
    
         RETURN
    
      END
    
      EXEC foo
    

    This trigger would automatically be executed whenever we updated one/more records in YOUR_TABLE. The “UPDATE” function is used to check whether or not the “Name” field has been updated by an “UPDATE” query that executed the “trig_updateAuthor” trigger. If field hasn’t, then the trigger returns control to SQL server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So lets say I have a table that looks something like this: ItemName ProductType
I have a real simple question here. I only want to know if there
I have a simple table like: | fkId | Item | --------------- | 1
I have page with a simple table and advanced search form. I pass List<Customers>
Current I am trying to show a simple table in my iPhone application where
I have 2 entities Role & Translation. Role -> Role_ID, Code Translation -> Code,
We're designing an Android app that has a lot of data (customers, products, orders...),
What I'm trying to achieve must be simple but I just can't get it
I have small problem when trying to create many-to-many link in doctrine. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.