I have some PLSQL code which loops through some logic:
FOR I in cur1
LOOP
SELECT value1, value2
FROM db1..table1 t1
END LOOP;
Can anyone explain to me the syntax for doing this in TSQL?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a generic loop in a standar TSQL Cursor. But try to avoid Cursors when possible. They Have very bad performance.