You can try as below:
Select a From(Select 1 a Union Select 2 Union Select 3 Union Select 4 Union Select 5 Union Select 6 Union Select 7)A
Where [dbo].[is_prime_number](a) = 'TRUE'
May be :
create procedure sp_starttest( @start int, @end int)
as
Begin
Declare @table Table(numbers int)
Declare @count int =1
While @start<=@end
Begin
Insert into @table(numbers) Select @start
Set @start = @start +1
End
Select numbers From @table
Where [dbo].[is_prime_number](numbers) = 'TRUE'
End
exec sp_starttest 100,200
No comments:
Post a Comment