t sql cursor tr

Solutions on MaxInterview for t sql cursor tr by the best coders in the world

showing results for - "t sql cursor tr"
Lamar
25 Jul 2017
1BEGIN
2  DECLARE cur_employee CURSOR FOR
3      SELECT Surname
4      FROM Employees;
5  DECLARE name CHAR(40);
6  OPEN cur_employee;
7  lp: LOOP
8    FETCH NEXT cur_employee INTO name;
9    IF SQLCODE <> 0 THEN LEAVE lp END IF;
10    ...
11  END LOOP;
12  CLOSE cur_employee;
13END