{"id":69107,"date":"2021-08-12T00:03:17","date_gmt":"2021-08-12T04:03:17","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/mysql-new-features-5\/"},"modified":"2021-08-12T00:03:17","modified_gmt":"2021-08-12T04:03:17","slug":"mysql-new-features-5","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=69107","title":{"rendered":"MySQL New Features #5"},"content":{"rendered":"\n<li> <a href='http:\/\/dev.mysql.com\/tech-resources\/articles\/mysql-storedprocedures.pdf' target='new' rel=\"noopener\">MySQL New Features<\/a><\/li>\n<li> Cursor Example:\n<pre>CREATE PROCEDURE p25 (OUT return_val INT)BEGINDECLARE a,b INT;DECLARE cur_1 CURSOR FOR SELECT s1 FROM t;DECLARE CONTINUE HANDLER FOR NOT FOUND &lt; --SET b = 1; &lt;--OPEN cur_1;REPEATFETCH cur_1 INTO a;UNTIL b = 1END REPEAT;CLOSE cur_1;SET return_val = a;END;\/\/<\/pre>\n<\/li>\n<li> Stored procedure in MySQL <a href='http:\/\/www.mysqltutorial.org\/stored-procedures-loop.aspx' target='new' rel=\"noopener\">http:\/\/www.mysqltutorial.org\/stored-procedures-loop.aspx<\/a><\/li>\n<li> Loop in stored procedure\n<pre>DELIMITER $$ DROP PROCEDURE IF EXISTS WhileLoopProc$$ CREATE PROCEDURE WhileLoopProc()       BEGIN               DECLARE x  INT;               DECLARE str  VARCHAR(255);               SET x = 1;               SET str =  '';               WHILE x  &lt; = 5 DO                           SET  str = CONCAT(str,x,&#039;,&#039;);                           SET  x = x + 1;                END WHILE;               SELECT str;       END$$   DELIMITER ;<\/pre>\n<\/li>\n<li> <a href='http:\/\/www.databasedesign-resource.com\/mysql-stored-procedures.html' target='new' rel=\"noopener\">MySQL Stored Procedure Example<\/a><\/li>\n<p>From: http:\/\/sitestree.com\/?p=5272<br \/> Categories:5<br \/>Tags:<br \/> Post Data:2008-04-12 21:14:20<\/p>\n<pre><code>    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\"&gt;https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    (Big Data, Cloud, Security, Machine Learning): Courses: &lt;a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"&gt; http:\/\/Training.SitesTree.com&lt;\/a&gt; \n    In Bengali: &lt;a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\"&gt;http:\/\/Bangla.SaLearningSchool.com&lt;\/a&gt;\n    &lt;a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\"&gt;http:\/\/SitesTree.com&lt;\/a&gt;\n    8112223 Canada Inc.\/JustEtc: &lt;a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\"&gt;http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) &lt;\/a&gt;\n    Shop Online: &lt;a href='https:\/\/www.ShopForSoul.com'&gt; https:\/\/www.ShopForSoul.com\/&lt;\/a&gt;\n    Medium: &lt;a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"&gt; https:\/\/medium.com\/@SayedAhmedCanada &lt;\/a&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>MySQL New Features Cursor Example: CREATE PROCEDURE p25 (OUT return_val INT)BEGINDECLARE a,b INT;DECLARE cur_1 CURSOR FOR SELECT s1 FROM t;DECLARE CONTINUE HANDLER FOR NOT FOUND &lt; &#8211;SET b = 1; &lt;&#8211;OPEN cur_1;REPEATFETCH cur_1 INTO a;UNTIL b = 1END REPEAT;CLOSE cur_1;SET return_val = a;END;\/\/ Stored procedure in MySQL http:\/\/www.mysqltutorial.org\/stored-procedures-loop.aspx Loop in stored procedure DELIMITER $$ DROP &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=69107\">Continue reading<\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917],"tags":[],"class_list":["post-69107","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":69099,"url":"http:\/\/bangla.sitestree.com\/?p=69099","url_meta":{"origin":69107,"position":0},"title":"Stored Procedure in MySql #5","author":"Author-Check- Article-or-Video","date":"August 12, 2021","format":false,"excerpt":"Starting from MySQL 5, you get Stored Procedure in Mysql What is a stored procedure: A stored procedure is simply a procedure that is stored on the database server like MySQL. In programming languages, you write procedures to execute a function\/logic. You can write similar procedure in SQL and store\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":75827,"url":"http:\/\/bangla.sitestree.com\/?p=75827","url_meta":{"origin":69107,"position":1},"title":"MS SQL Server Dynamic SQl, T-SQL","author":"Sayed","date":"June 25, 2023","format":false,"excerpt":"MS SQL Server Dynamic SQl, T-SQL Mostly: Dynamic SQL Stored Procedure Trigger Cursor Function Sayed Ahmed What are the Most Important Most Used Design ERD Convert ERD to database Normalization Indexing SQL Stored Procedure Dynamic SQL These will come, not too frequent Function, User Defined Data Types, Temporary Table Trigger,\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76602,"url":"http:\/\/bangla.sitestree.com\/?p=76602","url_meta":{"origin":69107,"position":2},"title":"Dynamic SQL","author":"Sayed","date":"January 30, 2025","format":false,"excerpt":"\"Dynamic SQL is the SQL statement that is constructed and executed at runtime based on input parameters passed\" https:\/\/www.sqlshack.com\/dynamic-sql-in-sql-server\/ Example: ChatGPT DECLARE @sql AS NVARCHAR(MAX) SET @sql = 'SELECT * FROM Employees WHERE Department = ''' + @department + '''' EXEC sp_executesql @sql Another Example: Oracle table_name := 'HR.Employees'; dyn_sql\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":76187,"url":"http:\/\/bangla.sitestree.com\/?p=76187","url_meta":{"origin":69107,"position":3},"title":"C Code Build a Binary Tree.","author":"Sayed","date":"July 20, 2024","format":false,"excerpt":"#include <iostream> #include <string.h> #include <stdlib.h> #pragma warning(disable : 4996) #define MaxWordSize 100 \/\/ Declare a structure that holds data in a node typedef struct { char word[MaxWordSize + 1]; } NodeData; typedef struct treeNode { NodeData data; struct treeNode* left, * right; } TreeNode, *TreeNodePtr; typedef struct { TreeNodePtr\u2026","rel":"","context":"In &quot;Data Structure and Algorithms&quot;","block_context":{"text":"Data Structure and Algorithms","link":"http:\/\/bangla.sitestree.com\/?cat=1966"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":10104,"url":"http:\/\/bangla.sitestree.com\/?p=10104","url_meta":{"origin":69107,"position":4},"title":"Example Java Programs","author":"","date":"August 3, 2015","format":false,"excerpt":"HelloWorld.java public class HelloWorld { \u00a0\u00a0\u00a0 \/\/ method main(): ALWAYS the APPLICATION entry point \u00a0\u00a0\u00a0 public static void main (String[] args) { \u00a0\u00a0 \u00a0System.out.println (\"Hello World!\"); \u00a0\u00a0\u00a0 } } \/\/ Print Today's Date import java.util.*; public class HelloDate { \u00a0\u00a0\u00a0 public static void main (String[] args) { \u00a0\u00a0 \u00a0System.out.println (\"Hello,\u2026","rel":"","context":"In &quot;Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8&quot;","block_context":{"text":"Code . Programming Samples . \u09aa\u09cd\u09b0\u09cb\u0997\u09cd\u09b0\u09be\u09ae \u0989\u09a6\u09be\u09b9\u09b0\u09a8","link":"http:\/\/bangla.sitestree.com\/?cat=1417"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":78165,"url":"http:\/\/bangla.sitestree.com\/?p=78165","url_meta":{"origin":69107,"position":5},"title":"Oracle PL\/SQL Concepts","author":"Sayed","date":"May 14, 2025","format":false,"excerpt":"Oracle PL\/SQL Concepts BLOCK declare .... Begin...End. Cursor Trigger Programming Clauses: if..then...else, case when, loops (for, while) Stored Procedure Function Advanced SQLs and Analytics Functions GROUP BY ROLLUP(), GROUP BY CUBE() RANK(), DENSE_RANK(), ROW_NUMBER() PARTITION_BY, ORDER BY X NULLS Last, ORDER BY X NULLS FIRST, RANGE BETWEEN INTERVAL 30 DAY\u2026","rel":"","context":"In &quot;Root&quot;","block_context":{"text":"Root","link":"http:\/\/bangla.sitestree.com\/?cat=1"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69107"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/69107\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69107"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}