{"id":681,"date":"2013-01-08T09:43:08","date_gmt":"2013-01-08T09:43:08","guid":{"rendered":"http:\/\/codeatelier.wordpress.com\/?p=440"},"modified":"2016-09-10T14:11:38","modified_gmt":"2016-09-10T14:11:38","slug":"how-to-create-for-loop-in-mysql-procedure","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/how-to-create-for-loop-in-mysql-procedure\/","title":{"rendered":"How to create for loop in MySQL Procedure"},"content":{"rendered":"<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nDROP PROCEDURE IF EXISTS while1;\r\nCREATE PROCEDURE while1()\r\nBEGIN\r\n DECLARE v_max INT DEFAULT 15; \r\n DECLARE v_counter INT DEFAULT 0;\r\n \r\n  WHILE v_counter &amp;lt; v_max do\r\n    SELECT v_counter;  \r\n    SET v_counter=v_counter+1;\r\n  END WHILE; \r\nEND;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DROP PROCEDURE IF EXISTS while1; CREATE PROCEDURE while1() BEGIN DECLARE v_max INT DEFAULT 15; DECLARE v_counter INT DEFAULT 0; WHILE v_counter &amp;lt; v_max do SELECT v_counter; SET v_counter=v_counter+1; END WHILE; END;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,87],"tags":[],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-mysql","category-procedures"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=681"}],"version-history":[{"count":2,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":1582,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/681\/revisions\/1582"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}