FOR LOOP replacement SQL Server
In Oracle it looks like this:
FOR cursor2 IN cursor1 LOOP
INSERT INTO TABLE
(
NAME,
AGE,
WHATEVER
)
VALUES
(
cursor2.NAME
cursor2.AGE
cursor2.WHATEVER
);
This is a bit confusing to me, as I am attempting to transfer this logic
to SQL Server. I don't see why IN is used here. I guess cursor2 acts as an
Alias for the cursor?
No comments:
Post a Comment