i want to use cursor inside a cursor
or can i write query like
select t.name,t1.name
from dbo.sysobjects as t, dbo.sysobjects as t1
where t.name like 'a%' or t1.name like "b%a"
and use a single cursor to fetch the both kind of table name?
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.
You can use a cursor inside another cursor (not recommended!).
But if that is what you want you can use a cursor with one query only.
If you want cartesian query it’s like this:
If you want another type of query just tell what do you expect to see as the result.