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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can we have a nested transaction? : Sql server database administration

492


Is sql server difficult to learn?

515


How to create a user name in a database?

580


What is the difference between delete and truncate statements?

562


Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?

560






What is the recommended total size of your memory optimized tables?

519


Why truncate is ddl command?

512


What are the restraints imposed on the table design by a merge replication?

561


What are the types of containers in ssis?

596


How to copy the tables, schema and views from one sql server to another?

551


How fixed length strings are truncated and padded?

540


Explain having clause?

526


Which sql server table is used to hold the stored procedure script?

472


Why use “pivot” in sql server?

614


Does partitioning improve performance?

477