Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?

Answers were Sorted based on User's Feedback



write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / dhana

update e2 set e2.empname = e1.empname
from emp2 e2,emp1 e1
where e1.empid = e2.empid

Is This Answer Correct ?    8 Yes 1 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / vidya

update emp2 set empname =e.empname from emp1 e where
e.empid =emp2.empid

Is This Answer Correct ?    1 Yes 1 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / a

Update emp2 set empname = (Select empName from emp1 where
emp2.empid =emp1.empid)

Is This Answer Correct ?    2 Yes 2 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / vicky

update emp2 e2 set e2.empname = (select e1.empname from
emp1 e1 where e2.empid=e1.empid)

Is This Answer Correct ?    0 Yes 0 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / saravanan

update w set w.ename=q.ename from empn1 w,
(select e.ename,e.empid from empn e,empn1 a where
a.empid=e.empid) q where w.empid=q.empid

Is This Answer Correct ?    0 Yes 1 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / 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

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / pradip jain

update e2
set e2.name= e1.name
from emp2 e2
join emp1 e1 on e1.id=e2.id

Is This Answer Correct ?    0 Yes 1 No

write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Nam..

Answer / rafi

Insert in to emp2 values as select * from emp1;

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SQL Server Interview Questions

What is the use of =,==,=== operators?

0 Answers  


How to use “drop” keyword in sql server and give an example?

0 Answers  


How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

0 Answers  


What is sql sandbox in sql server?

0 Answers  


Can binary strings be used in arithmetical operations?

0 Answers  


Explain what is the use of custom fields in report?

0 Answers  


what are different types of backups available in sql server? : Sql server database administration

0 Answers  


Can you change the data type of a column in a table after the table has been created? If so, which command would you use?

0 Answers  


Explain insert into select statement?

0 Answers  


What is inline table-value user-defined function?

0 Answers  


What is "scheduled jobs" or "scheduled tasks"?

0 Answers  


Explain the phases a transaction has to undergo?

0 Answers  


Categories