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 751421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:39:54+00:00 2026-05-14T14:39:54+00:00

For example, i have a column named EmployeeName. Every time a user changes/fix his

  • 0

For example, i have a column named EmployeeName.

Every time a user changes/fix his name, i need to keep a count. If he changes his name twice, then count is 2. Also, i need to store the time of every change employee makes on EmployeeName e.g. if the name essentially is James and time created is 9:00 AM and then employee changes to John on 11:00 AM, i need to preserve this new time and new value as well as the previous one which is James at 9:00 AM.

I hope its clear! Thank you guys…Best Answer will be chosen…

If this requires a trigger, giving a sketchy pseudo-code will be very much appreciated.

  • 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-14T14:39:54+00:00Added an answer on May 14, 2026 at 2:39 pm

    First up – if not already implemented, highly advisable to have employees identified by a permanent identifier (i.e. NOT EmployeeName) and so you can keep track on everything.

    If you want to use a trigger, you could use an AFTER UPDATE trigger and look for a change to the name using if update(EmployeeName).

    If that’s been updated, you could increment the count column on the Employee table at the same time. Use the inserted table to identify those entries which have been updated. (Is the count essential? If you are storing a history of the name changes, I don’t think it’s necessary to have a count column – it’s redundant informaiton.)

    You would then add a row to your employee name history table that holds the details of this change with the current timestamp.

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

Sidebar

Related Questions

For example, I have a table name test_table and has a column named column_A
I have a column named streetaddress that contains <Street Number> <Street Name> for example:
For example, I have a table, and there is a column named 'Tags'. I
I need to get some data from a column. For example I have data
Say that I have a table with one column named CustomerId. The example of
I have a column named thedate that is varchar. An example of a row
I have a column named updatetime that is a timestamp . So, for example,
For example: I have the normal column name: SELECT column FROM.... The way i
I have many databases that uses various column-names for the same things. For example,
wel if you have a mastertable any columns example mastertable columns createdon,modifiedon,name,id detailtable has

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.