Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
MySQL Tutorial
Procedure Function 170 codes
Home
MySQL Tutorial
Procedure Function
1 A function that takes a parameter, performs an operation using an SQL function, and returns the result
2 ALTER PROCEDURE and ALTER FUNCTION Syntax
3 Assign value to a variable with set command
4 BEGIN and END Statements
5 Big integer with default value
6 Boolean operator
7 Call another function
8 Call another procedure
9 Call another procedure to pass the error code
10 Call another procedure with parameter
11 Call buildin math function in your procedure
12 CALL Statement Syntax
13 Call stored procedure in Java and get the result set
14 Call stored procedure in VB net
15 Calling a Single-Statement Procedure
16 Calling a stored procedure in Java
17 Calling a stored procedure in Perl
18 Calling a stored procedure in PHP
19 Calling a stored procedure in PHP and deal with the result
20 Calling a stored procedure in Python
21 Calling a stored procedured in C#
22 CASE Statement with Condition Checks
23 CASE WHEN with ELSE
24 Changing and Removing Functions
25 CHAR(255) DEFAULT This will be padded to 255 chars
26 Check function parameter and return value
27 Check input parameter
28 Check MySQL version
29 Check version with if statement
30 Checking Exit flag
31 Checking flag
32 Commit an update in a procedure
33 Concatenate string with integer
34 Condition and Handler in action
35 Create a dynamic statement in a procedure
36 Create a procedure for READS SQL DATA
37 Create a table in a procedure
38 Create a TEMPORARY table and save data into it in a procedure
39 CREATE DEFINER for a procedure
40 CREATE TEMPORARY TABLE in a procedure
41 Creating a Multistatement Stored Procedure
42 Creating a Single-Statement Procedure
43 Creating Functions
44 Date calculation in a procedure
45 DATE DEFAULT 1999-12-31
46 DATE type variable
47 DATETIME DEFAULT 1999-12-31 23
48 DateTime parameter
49 Deal with cursor within a TRANSACTION
50 Declare a big integer
51 Declare and use the OUT parameter
52 DECLARE CONTINUE HANDLER FOR command_denied
53 DECLARE CONTINUE HANDLER FOR duplicate_key
54 DECLARE CONTINUE HANDLER FOR foreign_key_violated
55 DECLARE CONTINUE HANDLER FOR NOT FOUND SET
56 DECLARE EXIT HANDLER FOR
57 Declare INTEGER variable in procedure
58 Declare variable with default value
59 Declaring a Condition and Handler
60 DELETE statement with a procedure variable
61 DETERMINISTIC function
62 DOUBLE DEFAULT 2e45
63 Drop a TEMPORARY table in a procedure
64 DROP PROCEDURE and DROP FUNCTION Syntax
65 Example of an INSERT using a procedure variable
66 Example of an UPDATE statement using procedure variables
67 EXECUTE dynamic SQL command
68 FLOAT DEFAULT 1 8e8
69 FLOAT point value
70 For checking a uniform condition you may use the CASE construct
71 Function Permissions
72 Get lock in a procedure
73 Get returning value from a MySQL stored procedure in Perl
74 Get returning value from a stored procedure in C#
75 IF
76 IF statement in a LOOP statement
77 IF statement in a While loop
78 If statement with ELSEIF and ELSE
79 Inner variable shadows the outter variable
80 Insert data in a while loop
81 Insert data into a table in a procedure
82 Integer variable with default value
83 LEAVE to a label
84 LEAVE with Label out of an inner loop
85 LOCAL, SESSION, AND GLOBAL VARIABLES IN MYSQL
86 Logic operator
87 LOOP Statement with LEAVE
88 LOOP with ITERATE
89 Loop with ITERATE Statement
90 LOOP with LEAVE
91 Math operators
92 Nested blocks
93 Nested function call
94 Nesting if statement with LOOP statement
95 NUMERIC(8,2) DEFAULT 9 95
96 Output message with select statement in a procedure
97 Pass status code and message out of a procedure
98 Pass variable to a procedure as the OUT parameter
99 Recursion
100 REPEAT Statement
101 Repeat until loop
102 Return integer value from a function
103 Return NUMERIC(8,2) from a function
104 Return the file size by using the LOAD_FILE function
105 Return value from a function
106 Returning Decimal from the function
107 ROLLBACK in a procedure
108 ROLLBACK TO a save point in a procedure
109 Save select result into a variable
110 Save status to an OUT parameter
111 Savepoint example
112 Select information from the mysql proc table and get all the underlying data
113 Select into variables
114 Set delimiter to $$ for creating procedure
115 Show the procedures database, name, language, security type, parameter list, body, definer, comment, and other informat
116 Simple LOOP
117 Single statement function
118 Start and commit a TRANSACTION
119 START TRANSACTION
120 Stored Procedure Permissions
121 TEXT type variable
122 TEXT variable with DEFAULT value
123 The ALTER statement lets you change the characteristics of a stored procedure
124 The CREATE PROCEDURE Statement
125 The DECLARE Statement
126 The example associates a handler with SQLSTATE 23000, which occurs for a duplicate-key error
127 The stored procedure characteristics include a number of options for how the stored procedure behaves
128 To get more details on a stored procedure, use the SHOW CREATE PROCEDURE statement
129 To ignore a condition
130 To remove a stored function, use the DROP command
131 To remove a stored procedures, use the DROP statement
132 To see all of the functions across all databases, use the SHOW FUNCTION STATUS command
133 Unsigned integer variable with default value
134 Update a table in a procedure
135 Use Build-in SUM function in a procedure
136 Use select into to assign value to an Integer variable
137 Use SELECT statement to access on the proc table in the mysql database
138 Use the SHOW CREATE FUNCTION command
139 Use user-defined function in a select statement to deal with data in a table
140 Use user-defined function in order by clause
141 Use user-defined function in where clause
142 Using an OUT parameter
143 Using buildin function in user-defined function
144 Using CASE WHEN condition statement in a procedure
145 Using CASE WHEN statement in a procedure
146 Using complex select statement in a procedure
147 Using Declare statement to declare the local variable
148 Using OR in an IF statement
149 Using OUT parameter to return the status code and message from a procedure
150 Using PHP to call a stored procedure and output the result
151 Using Repeat until to loop through a cursor
152 Using SELECT INTO is a method for setting variables
153 Using select statement in a procedure
154 Using Set to declare variable in a procedure
155 Using String functions in a user-defined function
156 Using the IF statement to verify CONTINUE HANDLER
157 Using the returning value from a user-defined function in order by clause
158 Using user-defined function in a select statement
159 Using while to check the condition
160 VARCHAR type variable
161 VARCHAR(255) DEFAULT This will not be padded
162 Variable scope
163 Variable type NUMERIC(8,2)
164 Variables
165 Verify the input parameter
166 Viewing Stored Procedures
167 Viewing Stored Procedures with a LIKE clause
168 WHILE Statement
169 While loop
170 You can set parameters for a stored procedure