Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ForceF16
Starting Member
13 Posts |
Posted - 2007-02-28 : 13:35:00
|
Hi,I have two tables in one database. I need to create a trigger in order to sync both tables. Table 1 Table 2 Column Name: Column Name:User_Name FirstName User_email MidleNameState LastName Email StateUser_Title TitleUser_Phone Phone Here is my question: IF I need to update info on table 1 and it's automatically update on table 2. can someone can help me to write a trigger like this? Thanks, Dandan |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-02-28 : 13:41:40
|
create trigger trigTable1 on table1 for update, insert asinsert into table2 (yourColumns)select yourColumnsfrom insertedCausing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-28 : 13:43:38
|
Triggers are usually bad to use. So please explain why you want to update Table2 when Table1 gets updated. What is the business requirement here?Tara Kizer |
 |
|
ForceF16
Starting Member
13 Posts |
Posted - 2007-02-28 : 14:38:06
|
Tara,it's a requiremnent in this enviromnent. what are the other options need to be done other than Trigger? Please let me know.Dandan |
 |
|
|
|
|