using while loop
Why a loop, in SQL we work set-based, not row-wise?
At all, that's really to less on information.
Please post table design as DDL, some sample data as DML statement and the expected result.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi ,
i want to search for a particular student_name in a row(i have 150 rows) in an existing Student_Table using while loop in stored procedure and once if a find a student_name then i need to store it in a new variable
Note : student names data varies daily it is not fixed row so dont want to go with hard coding, i need to read Student_Table using while loop.
Thanks,
using while loop
Why a loop, in SQL we work set-based, not row-wise?
At all, that's really to less on information.
Please post table design as DDL, some sample data as DML statement and the expected result.
Hi @K Aravind Kumar
Your description of the problem confuses me, if it's just searching the entire table for specific data, then using
select * from Student_Table where student_name = '...'
That's enough.
If you want to store the found data into a new variable, you might use a while loop.
Please provide more information based on Olaf's recommendations.
Best regards,
Percy Tang
If the answer is the right solution, please click "Accept Answer". If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.