write down the sql query?

Table Name : emp1
empid empname
1 bala
2 guna

Table Name : emp2
empid empname
1 <Null>
2 <Null>

Solution : emp1 names are updated in emp2, write a query?

Answer Posted / rajesh.a

Update e2
set e2.empname=e1.empname
from
emp2 e2 inner join emp1 e1 on e1.empid=e2.empid

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is SQL Azure?

85


How is SQL Azure different than SQL server?

93


How to deploy the Report?

95


How to create and drop temp table in sql server?

591


How many replicas are maintained for each SQL Azure database?

128






Explain atomicity?

579


What is dbcc?

737


Which are the olap features?

552


i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.

1379


How many types of functions are there in sql server?

465


What are the benefits and tasks of object explorer? : sql server management studio

611


Tell me what is the significance of null value and why should we avoid permitting null values?

553


What is database replication? What are the different types of replication you can set up in sql server?

502


How to optimize stored procedure optimization?

519


Does order by actually change the order of the data in the tables or does it just change the output?

684