…A stored procedure is defined with the create procedure statement.…For this lesson I'm going to use the album database.…And we're going to start by creating a simple procedure.…Now, a procedure may have multiple lines in it.…And these multiple lines may be delimited with semicolons.…And in order for that entire block of.…Text.…That entire block of code to be sent to the server all at once.…We need to actually change the delimiter…for a short time, temporarily, to something…else, so that that entire block can be sent to the server as a unit.…
So that looks like this.…I use the DELIMITER command.…And I changed delimiter to something other than a semicolon like that.…I'll change it back when we're done and then, I type CREATE PROCEDURE and I name…the procedure and I have BEGIN and END and, after the end,…I put in that double-slash and then, this entire block along with the statements.…I'm just going to put in a SELECT statement here for now.…That entire block from create procedure all the way down to the…end all gets sent to the server as one unit, and that's important.…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.