MySQL - Stored Procedures Introduction

preview_player
Показать описание

Stored Procedures allow you to write and call full SQL Statements just like scripts in an operating system.

Create Procedure:

delimiter $$

create procedure procedureName()
begin
select * from table;
end$$

delimiter ;
delimiter $$ or delimiter ; – sets delimiter
call procedureName; – calls procedure
show procedure status where db=’databaseName’; – shows procedures in database
show create procedure procedureName; – shows how procedure was created
drop procedure procedureName; – deletes procedure
Рекомендации по теме
Комментарии
Автор

Eli, you're killing it! By far the easiest to comprehend explanation and application of use for stored procedures that I've received. I appreciate the great instruction and video.

MattRMcD
Автор

Quite impressive and comprehensive concept of stored procedures. awesome Eli..!

Kunaispa
Автор

Interesting video, very simple to understand.

barafow
Автор

I was hoping you would get into passing parameters, but good video.

cseale
Автор

First of all... The way you explained is fantastic. It was easy to understand. Now I have a question. Suppose if I call a procedure in a production db, will it impact the production?

Nasha
Автор

Why not creating View ? What’s the difference ?

tamimhekmatpey
Автор

What I learned the hard way, Is just don't type anything at all on a live database LOL... I backup before doing any manual functions

JessieCrypto
Автор

can you create a tutorial of creating a procedure to be used on datagridview in c# for real time editing directly from datagridview?

hangc
Автор

• You'd think MySQL would be smart enough to recognize you're in a create-procedure call and ignore semicolons; maybe have a separate delimiter for it and similar functions. The developers need to take a class on creating user-friendly programs. ¬_¬
• Stored procedures are useful when running in the CLI client, but is there a practical use for developers? It seems unnecessary when running SQL queries in a program since even the most convoluted query is trivial when it's run from code. 🤔

vnceigz
Автор

1m subscribers and 154 likes...Shame on you people.

hesamsarkhosh
visit shbcf.ru