November 27, 2025 at 5:06 pm
Apologies if this is posted in the wrong forum, but I am trying to run a simple cursor in Azure Query Editor (Preview).
In Azure Query Editor, it does not run and shows no output. But the same code works in SSMS 21.
Is this a limit in Query Editor? Do I need special permission?
Thanks.
November 27, 2025 at 9:03 pm
If I had to guess, I'd say you are running into a limitation of Azure Query Editor. Likely either the 5 minute timeout or the "multiple statements only give results for the last one" limitation.
The second limitation is that if you have a query like:
SELECT 1;
SELECT 2;
your result will only be 2.
Best I can tell, query editor doesn't have any limitations around cursors, BUT that being said, cursors are generally best to be avoided. They are rarely needed - they do have purposes and use cases, but in MOST cases, a cursor is the wrong approach to the problem.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
November 28, 2025 at 2:29 am
Thank you. I got it
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply