Hi,
how can i use 2 Query in store Procedure?
I have user table that have username, userId (primary key) field and have userinfo table that have userId ,userinfo(prima ry key),firstName field
I want to do this:
1.getting userId from user table : (select userId from user where username=@usern ame )
2.adding userId into userinfo table:insert into userinfo ( userId,firstNam e) values(?????,@f irstName)
I don't know,how can i getting value from one table and using it to another table.
Please Help Me.
Thanks.
how can i use 2 Query in store Procedure?
I have user table that have username, userId (primary key) field and have userinfo table that have userId ,userinfo(prima ry key),firstName field
I want to do this:
1.getting userId from user table : (select userId from user where username=@usern ame )
2.adding userId into userinfo table:insert into userinfo ( userId,firstNam e) values(?????,@f irstName)
I don't know,how can i getting value from one table and using it to another table.
Please Help Me.
Thanks.
Comment