Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
immad
Posting Yak Master
230 Posts |
Posted - 2013-12-20 : 06:24:44
|
this is my first table CID-----BID---EID-----Ename-------------Phone---------CELL NO1--------1----7--------A---------------5047183-----031382364151--------1----15-------B---------------5045107-----03212634704this is my second tableCID-----BID---EID-----Ename-------------Phone---------CELL NO1--------1----7---------A------------------------------------1--------1----15--------B------------------------------------i want a query to update my second table from first table. like thisafter execute query my second table look like thisCID-----BID---EID-----Ename-------------Phone---------CELL NO1--------1----7--------A---------------5047183-----031382364151--------1----15-------B---------------5045107-----03212634704thanks 4 the helpimmad uddin ahmed |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-12-20 : 06:54:31
|
try this:update t2set Phone = t1.Phone, Cell_No = t1.Cell_Nofrom first_table t1join second_table t2on t1.CID = t2.CID and t1.BID = t2.BID and t1.EID = t2.EID and t1.Ename = t2.Ename Too old to Rock'n'Roll too young to die. |
 |
|
|
|
|