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

Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow?

2 Answers  


Which sql server is best?

0 Answers  


Distinguish between commit and rollback?

0 Answers  


Say if we have a table that contains only a single column , say OrderID, which has IDENTITY attribute defined on it. So how can we insert data in this table. I am reframing my question, that how can we make the table to increment the column "OrderID" value several times???

3 Answers  


How do I list the available tables in a database I'm querying?

4 Answers  


Please give me queries for the following 1. To get the count of duplicate records. 2. A query to delete the duplicate records.

3 Answers   247Customer,


how to find number of columns in a table in sql server 2000 and 2005 also

7 Answers   HCL, Virtusa,


What is the difference between a check constraint and a rule?

0 Answers  


Detail about the hardware which is supported by SQL server?

0 Answers  


How to Generate a Series of Random Integers With T-SQL?

1 Answers  


What is the default isolation level of the sql server database?

1 Answers   Ness Technologies,


What is the difference between login and a user?

13 Answers   CTS, TCS,


Categories