English Grammar and
Examples
Idioms
Jargon
Body language
MYSQL
Show Function Status
Show Index
Show Master Status
Show Privileges
Show Procedure Code
Show Procedure Status
Show Privileges
Show Profile
Show Profiles
Show Slave Status
Show Status
Show Triggers
Show Variables
Show Function Code
Call
Drop Function
Insert
Install Plugin
Load data infile
Replace
Set
Show Authors
Show Innodb Status
Show Open Tables
Show Plugins
Show Scheduler Status
Show Slave Hosts
Show Table Status
Show Tables
Show Warnings
Uninstall Plugin
Update
Show Create View
Show Databases
Show Engine

Full list of MYSQL
   Business Letters   Personal Letters   Resumes   CVs and more
       Facebook example of create procedure and create function mysql LINKED IN example of create procedure and create function mysql del-icio-us example of create procedure and create function mysql

Example Of CREATE Procedure AND CREATE Function Mysql Syntax:




CREATE PROCEDURE Example CREATE
[DEFINER = { user | CURRENT_USER }]
PROCEDURE sp_name ([proc_parameter[,...]])
[characteristic ...] routine_body

CREATE Function Example CREATE
[DEFINER = { user | CURRENT_USER }]
FUNCTION sp_name ([func_parameter[,...]])
RETURNS type
[characteristic ...] routine_body

proc_parameter:
[ IN | OUT | INOUT ] param_name type

func_parameter:
param_name type

type:
Any valid MySQL data type




characteristic:
LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'

routine_body:
Valid SQL PROCEDURE statement

CREATE DEFINER = 'admin'@'localhost' PROCEDURE account_count()
BEGIN
SELECT 'Number of accounts:', COUNT(*) FROM mysql.user;
END;

CREATE DEFINER = 'admin'@'localhost' PROCEDURE account_count()
SQL SECURITY INVOKER
BEGIN
SELECT 'Number of accounts:', COUNT(*) FROM mysql.user;
END;



         


Link to this page:
* Required Fields
 Add Comment:
Name* :
Email :
Comment* :
 
Contact Us About Us Privacy Policy Disclaimer
Copyright © 2008 - 2010 ExamplesOf .com