hi friendsi have one problem for update tablehave two tabledeclare @t1 table(id int not null identity(1,1), shesab int null, phone int null) insert into @t1 select 54000,null union all select 55000,null union all select 56000,nullselect*from @t1declare @t2 table(id int not null identity(1,1), shesab int null, phone int null) insert into @t2 select 54000,300 union all select 54000,500 union all select 54000,600 union all select 55000,600 union all select 55000,800 union all select 56000,600 union all select 56000,100 union all select 56000,900select*from @t2(????? ??????????: 3)id shesab phone----------- ----------- -----------1 54000 NULL2 55000 NULL3 56000 NULL(????? ??????????: 3)(????? ??????????: 8)id shesab phone----------- ----------- -----------1 54000 3002 54000 5003 54000 6004 55000 6005 55000 8006 56000 6007 56000 1008 56000 900(????? ??????????: 8)
problem hier thisi need update column phone in @t1 table where @t1.shesab=@t2.shesabbut every shesab in have a 2-3 phone in @t2 table me need also one phone from @t2 table for example need result table from update id shesab phone----------- ----------- -----------1 54000 5002 55000 8003 56000 900http://sql-az.tr.gg/