Hi Team,
I have a procedure where the requirement is when ever a user is deleted then we need to update the table with username + Deleted + 1 for the 2nd deletion
username + Deleted + 12 and so on. please help me here how can I achieve this in this following code:
DECLARE @userName VARCHAR(400)
SET @userName =(SELECT UserName from usertable where userno = @userno);
Update users Set UserName ='[DELETED] '+ @userName where userno = @userno;
END
SELECTISNULL(CAST(@userno ASvarchar(50)),null) userid;
END