How to Create a Simple MySQL Stored Procedure
HTML-код
- Опубликовано: 9 июл 2024
- 📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-...
🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql...
MySQL stored procedures are a helpful way to contain business logic for your database.
In this video, you'll learn:
- how to create a stored procedure
- examples of creating stored procedures to select, insert, update, and delete
- common errors when creating or running stored procedures and how to resolve them
⏱ TIMESTAMPS:
00:00 - Intro and sample data
01:11 - Create a simple Select stored procedure
02:30 - Getting an error and fixing it
05:09 - Procedure for insert
08:47 - Procedure for update
10:25 - Procedure for delete
11:54 - Enhancements
🔗 VIDEO LINKS:
Script mentioned in video: github.com/bbrumm/databasesta... Наука
Thanks, clear and to the point.
Glad it was helpful!
Thanks! Really helpful!
You’re welcome!
Thanks a lot for this video! it was so easy to understand you!
Glad to hear it!
Finally i found a great video thanks !
Glad it helped!
Million ❤Thanks sir
You’re welcome!
Thank you the Database Star. Which application do you use for writing and executing SQL code?
You're welcome! In this video I used MySQL Workbench, which is a free and popular tool for working with MySQL.
How to update (refresh) stored procedure in Mysql workbench every minute (automate)
I believe you can create a job to do this, but I can look into it.
Loved your videos!
Can we have a guide for database modeling around spreadsheet-like web apps such as Google sheets, Airtable, etc... where cells have formulas created by users.
I've been researching for quite around sometime on how to best approach this, i've asked chatgpt and it gives me a solution to use dependency list logic in client side. When i have formula in row A col A whose value depends on row A col B, which also depends on row A col C.
But i'm also wondering if it's efficient to use stored procedures to automatically update row values based on changes from another row.
Thanks! Good idea. I'm not sure that a database design for a spreadsheet would be that complex: you could have a table called "cells" and it could have a row number, column number, and cell contents. The application logic would display the cell contents in the cell.
I'm not sure if the client side or server side (or database) would be the best place to do this. I would guess the client side, but it's not my area of expertise.
❤
Thanks!