Here is my problem.I have two tables 'Stdd'Stdd
and 'result'result
. 'stdd' have fields id,fname,lname,gender,phonenum,city AND 'result' have
stdd
columns physics,chem,math,english,urdu,bio,total,id.
I:
id
fname
lname
gender
phonenum
city
result
columns:
physics
chem
math
english
urdu
bio
total
id
I want that in 'result'result
table idthe column id
copy data from 'stdd' idstdd
column id
, and other columns(fields) of 'result'result
columns remain empty or null.How
How can i do this please help. I I try this but nor works for me
update result set id= (select id from stdd)
following error come
Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.
Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated.
I want this kind of output.Here is 'result' table
I'm using microsoft sql server 2008