SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
/*declare @num int set @num=1 declare @result varchar (max) set @result='' while @num<=1000 begin if @num<100 begin print @num end set @num=@num+1 end*/ declare @i int, @k int, @ok bit, @result varchar(8000) set @i = 2 set @result = ltrim(str(@i)) set @i = 3 while @i <= 1000 begin set @k = 2 set @ok = 1 while @k <= sqrt(@i) begin if @i % @k = 0 begin set @ok = 0; break end set @k += 1 end if @ok = 1 set @result += '&' + ltrim(str(@i)) set @i += 1 end print @result;

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear