GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 88 of 190    Print  
i hve two tables EMP1&EMP2 both having same fields if any updations made in emp1 how to reflect on emp2

  
Total Answers and Comments: 5 Last Update: June 22, 2008     Asked by: ramarao 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 24, 2006 11:07:39   #1  
chitra        

RE: i hve two tables EMP1&EMP2 both having same fields...
try to write update/delete/insert trigger on emp2 which will fire on updation/deletion/insertion in emp1
 
Is this answer useful? Yes | No
January 03, 2007 07:02:46   #2  
ravi        

RE: i hve two tables EMP1&EMP2 both having same fields...

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


 
Is this answer useful? Yes | No
January 07, 2007 06:55:20   #3  
hemalatha.bahadur Member Since: January 2007   Contribution: 2    

RE: i hve two tables EMP1&EMP2 both having same fields...
write triggers on emp2,so that any updations in emp2 will reflect emp1.
for this we use trigger structure,implement the logic and execute.

 
Is this answer useful? Yes | No
November 19, 2007 05:54:33   #4  
rajakumar_na Member Since: November 2007   Contribution: 26    

RE: i hve two tables EMP1&EMP2 both having same fields...
i think if any updation made in emp1 it wil not reflect in emp2.bcz table name r difference.
 
Is this answer useful? Yes | No
June 22, 2008 01:31:12   #5  
krishnaindia2007 Member Since: September 2007   Contribution: 870    

RE: i hve two tables EMP1&EMP2 both having same fields if any updations made in emp1 how to reflect on emp2
 Use triggers to guarantee that when a specific operation is performed, related actions are performed
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape