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 / 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 |
Post New Answer View All Answers
What is an sql server agent?
How to create a dynamic cursor with the dynamic option?
explain declarative management framework (dmf) in sql server 2008?
How to loop through returning rows?
Can two tables have the same primary key?
what is hash nonclustered index
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?
What is an index in a database?
How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication
How to change a login name in ms sql server?
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
Explain the dirty pages?
What is a subquery in a select query statement in ms sql server?
Does union all remove duplicates?
How to create percentile function?