Monday, June 8, 2020

sql recursion or recursion in sql server or go to



DECLARE @text VARCHAR(50) = NULL;
nn:
if(@text is not null)
begin
EXEC [dbo].[CreateRandomString] @minLength = 10,@maxLength = 10, @randomString = @text OUTPUT;
end
if(@text is null) begin
set @text='Pudzw6p5w'
end
if(select count(*) from product_keypin where pinkey=@text)>0
begin
print 'Duplicate'
goto nn
end else begin
print 'No Duplicate'
end;

No comments:

Post a Comment

Linq Expression syntax for where condtion in linq

(Expression<Func<T, bool>> filter)