23rd chapter-Using Stored ProceduresThis chapter describes what stored procedures are, why you use stored procedures, and how to use stored procedures, and describes the basic syntax for creating and using stored procedures.23.1 Stored
one, stored proceduresSo far, most of the SQL statements used are single statements for one or more tables. Not all operations are so simple, and often there is a complete operation that requires multiple statements to complete. For example,
Turn from the Internet.When a large system is established, it is found that a lot of SQL operations are overlapping, the individual calculations are the same, for example: In the business system, the calculation of a work order. When this happens,
mysql| Stored Procedures | tutorials
Author: MySQL AB; translation: Chen Bong
Introduction Introduction
The MySQL 5.0 new features tutorial is written for old MySQL users who need to understand the new features of version 5.0. The simple
First, IntroductionA stored procedure (Stored Procedure) is a set of SQL statements that are compiled to perform a particular function, stored in a database, and invoked by the user by specifying the name of the stored procedure and given the
Document directory
1. Syntax
2. Description
3. Instance
4. Problems
1. Introduction
2. Advantages
3. Syntax
3. Instance
5. Use stored procedures in C Language
Trigger
Like the stored procedure, MySQL triggers are embedded into a MySQL
MySQL 21-29 highlights: Views, triggers, stored procedures, cursors, transaction processing bitsCN.com
21. create and operate tables
21. 1. create a table
Create table:
1) Name of the new table, after the keyword CREATETABLE
2) names and definitions
Stored procedures and functions define a collection of SQL statements in a database, and then call those stored procedures and functions directly to execute a defined SQL statement. Stored procedures and functions can prevent developers from writing
21. create and operate tables
21. 1. Create a table
Create table:
1) Name of the new table, after the keyword CREATETABLE
2) names and definitions of table columns, separated by commas
Create table MERs
(
Cust_id int not null
In MySQL, the basic form of creating stored procedures is as follows:
CREATE PROCEDURE sp_name ([proc_parameter[,...]])
[Characteristic ...] Routine_body
Where the Sp_name parameter is the name of the stored procedure,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.