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