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...
  • НаукаНаука

Комментарии • 18

  • @eleneroos7878
    @eleneroos7878 Месяц назад +1

    Thanks, clear and to the point.

  • @sabrihilal5030
    @sabrihilal5030 2 месяца назад +1

    Thanks! Really helpful!

  • @melanyromero4318
    @melanyromero4318 Год назад +1

    Thanks a lot for this video! it was so easy to understand you!

  • @furkan-gx2er
    @furkan-gx2er 11 месяцев назад

    Finally i found a great video thanks !

  • @kimlenghong8155
    @kimlenghong8155 2 месяца назад

    Million ❤Thanks sir

  • @oracle_professor
    @oracle_professor Год назад

    Thank you the Database Star. Which application do you use for writing and executing SQL code?

    • @DatabaseStar
      @DatabaseStar  Год назад

      You're welcome! In this video I used MySQL Workbench, which is a free and popular tool for working with MySQL.

  • @parajf
    @parajf 3 дня назад

    How to update (refresh) stored procedure in Mysql workbench every minute (automate)

    • @DatabaseStar
      @DatabaseStar  День назад

      I believe you can create a job to do this, but I can look into it.

  • @keent
    @keent Год назад

    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.

    • @DatabaseStar
      @DatabaseStar  Год назад

      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.

  • @dananjayachathuranga7113
    @dananjayachathuranga7113 11 месяцев назад