8

WL#3309: Stored Procedures: FOR statement

 3 years ago
source link: https://dev.mysql.com/worklog/task/?id=3309
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Search Tasks

Text:
Status:

About Worklog
MySQL Worklogs are design specifications for changes that may define past work, or be considered for future development.

WL#3309: Stored Procedures: FOR statement

Let's support standard FOR ... END FOR loops.
For example:
CREATE PROCEDURE p ()
BEGIN
  DECLARE counter INT DEFAULT 0;
  FOR SELECT a, b FROM t DO
    SET counter = counter + 1;
    END FOR;
  SELECT 'There are ',counter,' rows in t';
END
//
Copyright (c) 2000, 2020, Oracle Corporation and/or its affiliates. All rights reserved.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK