From the course: MySQL Advanced Topics
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Language extensions - MySQL Tutorial
From the course: MySQL Advanced Topics
Language extensions
- [Bill] Hi, I'm Bill Weinman. Every SQL system provides its own set of extensions for supporting variables and loops and other features in their stored routines. Here we will examine a small sample of MySQL extensions. For more details, please see the MySQL online documentation. I've copied this block of SQL from the chapter 3 exercise file. We're going to use the scratch database for this. Now, it's worth noting that procedures and functions are stored in a database, and so you need to use a database even if you're not necessarily using SQL in your stored routine. And here we create a procedure called STR COUNT. That simply counts from 1 to 5, concatenates it in a string, and displays that string. So we drop procedure if it exists, and in this case, it doesn't exist. You see we've got a little warning down here. And then we set our delimiter and we create our procedure. I'm going to go ahead and I'm going to execute all of this, and that creates our procedure. You notice we have the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.