GeekInterview.com
Series: Subject:
Question: 147 of 234

I have two tables EMP1&EMP2 both having same fields if any updations made in emp1 how to reflect on emp2

Asked by: Interview Candidate | Asked on: Oct 22nd, 2006
Showing Answers 1 - 7 of 7 Answers
chitra

Answered On : Oct 24th, 2006

try to write update/delete/insert trigger on emp2 which will fire on updation/deletion/insertion in emp1

  
Login to rate this answer.
ravi

Answered On : Jan 3rd, 2007

Using Joins we can update the fileds.

use alias names for common fields which r present in Emp1 and Emp2

 If Emp1 and Emp2 have  common  fields namely field1,field2 then: 

 update E1.field1,E2.field1 from Emp1 E1,Emp2 E2 where E1.field1=E2.field2

  
Login to rate this answer.

write triggers on emp2,so that any updations in emp2 will reflect emp1.
for this we use trigger structure,implement the logic and execute.

  
Login to rate this answer.
rajakumar_na

Answered On : Nov 19th, 2007

View all answers by rajakumar_na

i think if any updation made in emp1 it wil not reflect in emp2.bcz table name r difference.

  
Login to rate this answer.

Use triggers to guarantee that when a specific operation is performed, related actions are performed.

  
Login to rate this answer.
sampra

Answered On : Mar 6th, 2012

View all answers by sampra

write trigger

  
Login to rate this answer.
aytasirs

Answered On : Nov 15th, 2012

View all answers by aytasirs

Use DML Triggers to apply the same action to another table as well.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.