TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vijay Yadav
NA
1.4k
651.3k
Assign single varible a multiple rows using Select query in stored procedure
Jul 5 2011 9:32 AM
My query is to assign single varible a multiple rows using Select
query in stored procedure
For example:
I get 10(say 1 to 10) employee ids from from Employee table
declare @id int
select @id =EmpId from Employee
select @id
This will return 10 rows(i.e.Employee id , suppose there are 10 rows in a
table) now my question is how i will get this all rows in a single variable
and use that employee id one by one to perform some calculation.
Reply
Answers (
15
)
Random number generation in sql
How can insert blank value or null value in database.