Tsql can't update the column with count statement
Posted
by desi
on Stack Overflow
See other posts from Stack Overflow
or by desi
Published on 2010-04-29T16:54:56Z
Indexed on
2010/04/29
16:57 UTC
Read the original article
Hit count: 305
declare @t1 Table ( a1 int )
insert into @t1 select top 10 AnimalID from Animal
--select * from @t1
declare @t2 table ( dogs int null )
update @t2 set dogs = (Select COUNT(*) from @t1)
---------> The out put it gives me is just 0
© Stack Overflow or respective owner