Updating Date on GetDate Function From Different Table

时间:2015-11-18 21:02:56

标签: sql-server tracking getdate data-tracing

I'm fairly new to writing SQL and I consider myself quite novice in all facets of programming. I have been working on a sql project for a friend and wanted to track changes. I'm using SQL Server and Transact-SQL. Here's the table format and relationships at its most basic sense:

Table1: HouseNo, StreetName, TerritoryNo(FK)

Table2: TerritoryNo(PK), Tracking

Relationship Between Tables: TerritoryNo

Basically, I want the Tracking column for a TerritoryNo in Table2 to be updated with the getdate() function whenever there is a change to any corresponding row in Table1. How could this be acheived? Or is this even possible?

Thanks for your assistance and even reviewing this topic!!

0 个答案:

没有答案