CentOS7安装配置FTP服务器
2014-08-15 17:42
465 查看
mysql存储过程目前只支持存储过程,存储函数,触发器
存储过程基本结构:
Create procedure ProcedureName(Params[in,out])
Begin
Declare attr attrType;
procedure content;
End;
Example:
1. 创建基本存储过程
create procedure exampe1()
begin
declare l_student_count integer;
select count(*) into l_student_count from student;
select concat('there are totally ', l_student_count ,' students');
end;
2.删除存储过程
drop procedure example1;
3.创建带入参的存储过程
create procedure example2(stu_id int)
begin
declare stu_name varchar(30);
select name into stu_name from student where student_id = stu_id;
select stu_name;
end;
4.创建函数基本结构
create function example5() returns int
begin
declare student_count int;
select count(*) into student_count from student;
return student_count;
end;
5.创建触发器基本结构
create trigger example6 before update on t for each row
begin
If New.percent < 0 then
set New.percent = 20;
Else
set New.percent = 100;
End If;
End;
存储过程基本结构:
Create procedure ProcedureName(Params[in,out])
Begin
Declare attr attrType;
procedure content;
End;
Example:
1. 创建基本存储过程
create procedure exampe1()
begin
declare l_student_count integer;
select count(*) into l_student_count from student;
select concat('there are totally ', l_student_count ,' students');
end;
2.删除存储过程
drop procedure example1;
3.创建带入参的存储过程
create procedure example2(stu_id int)
begin
declare stu_name varchar(30);
select name into stu_name from student where student_id = stu_id;
select stu_name;
end;
4.创建函数基本结构
create function example5() returns int
begin
declare student_count int;
select count(*) into student_count from student;
return student_count;
end;
5.创建触发器基本结构
create trigger example6 before update on t for each row
begin
If New.percent < 0 then
set New.percent = 20;
Else
set New.percent = 100;
End If;
End;
相关文章推荐
- CentOS7安装及配置vsftpd (FTP服务器)
- CentOS7安装及配置vsftpd (FTP服务器)
- CentOS7安装配置FTP服务器
- centos 5 yum安装与配置vsFTPd FTP服务器
- centos 5 yum安装与配置vsFTPd FTP服务器详细步骤
- 在ubuntu下安装配置ftp服务器
- ftp服务器简单安装配置
- server-u构建FTP服务器、安装与配置
- Ubuntu环境FTP服务器vsftpd安装及配置方法
- centos 5 yum安装与配置vsFTPd FTP服务器
- ubuntu安装ftp服务器配置
- centos 5 yum安装与配置vsFTPd FTP服务器
- 安装FTP服务器并配置虚拟用户账号
- Linux下FTP服务器的安装和简单配置
- Windows下安装IIS以及配置ftp服务器说明文档
- centos 5 yum安装与配置vsFTPd FTP服务器
- reeBSD网站平台建设全过程(四、安装配置ftp服务器)
- ftp 服务器——bftpd 在 ubuntu 上的安装和简单配置
- Linux下FTP服务器的安装和简单配置 推荐
- CentOS5.x下安装配置FTP服务器