tsql - How can I select an interval in t-sql? -
i want result for (int a=0; a<10; a++) { print(a); } in procedural language. thus, result should be
0 1 2 3 4 5 6 7 8 9 yes, know not declarative thing, need. maybe windowing function trick? or procedural query?
use that:
with cte ( select 0 t union select t + 1 cte t < 9 ) select * cte
Comments
Post a Comment