DECLARE @RID INT;
---- get table rid
inside CUR_TEST
DECLARE CUR_TEST CURSOR FAST_FORWARD FOR SELECT RID FROM tbl_User_Registration
OPEN CUR_TEST
FETCH NEXT FROM CUR_TEST INTO @RID
WHILE @@FETCH_STATUS = 0
BEGIN
declare @EmdilID varchar(100)='test@gmail.com'
UPDATE tbl_User_Registration SET
emialid = @EmdilID WHERE RID = @RID;
FETCH NEXT FROM CUR_TEST INTO @RID
END
CLOSE CUR_TEST
DEALLOCATE CUR_TEST
GO
No comments:
Post a Comment