drop procedure if exists p_hello_world;

create procedure p_hello_world(in v_id int)
begin
if (v_id > 0) then
select '> 0';
elseif (v_id = 0) then
select '= 0';
else
select '< 0';
end if;
end; call p_hello_world(-9);

MySQL PLSQL Demo - 005.IF THEN ELSEIF THEN ELSE END IF的更多相关文章

  1. 【MySQL】MySQL PLSQL Demo - 006.循环(WHILE DO and FOR LOOP)

    WHILE DO drop procedure if exists p_while_do; create procedure p_while_do() begin declare i int; ; d ...

  2. MySQL PLSQL Demo - 003.静态游标

    drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare id integer; ) ...

  3. MySQL PLSQL Demo - 002.变量定义、赋值

    drop procedure if exists p_hello_world; create procedure p_hello_world() begin declare v_number int; ...

  4. MySQL PLSQL Demo - 001.创建、调用、删除过程

    drop procedure if exists p_hello_world; create procedure p_hello_world() begin select sysdate(); end ...

  5. java jdbc使用SSH隧道连接mysql数据库demo

    java jdbc使用SSH隧道连接mysql数据库demo   本文链接:https://blog.csdn.net/earbao/article/details/50216999   packag ...

  6. 【知识积累】SBT+Scala+MySQL的Demo

    一.背景 由于项目需要,需要在Sbt+Scala项目中连接MySQL数据库.由于之前使用Maven+Java进行依赖管理偏多,在Sbt+Scala方面也在不断进行摸索,特此记录,作为小模块知识的积累. ...

  7. mysql 游标 demo

    一.MySQL游标的概念 1.游标介绍 MySQL的游标(cursor)是一个重要的概念,通过查找资料与自己的理解,主要得出以下几点关于自己的理解. 有数据缓冲的思想:游标的设计是一种数据缓冲区的思想 ...

  8. python 操作mysql数据库demo

    sudo apt-get install python-mysqldb #!/usr/bin/env python #encoding=utf-8 import sys import MySQLdb ...

  9. MySQL Cursor Demo

    -- 使用cursor的demo -- ==============================## -- 删除存储过程 DROP PROCEDURE USP_TestCursor; DELIMI ...

随机推荐

  1. 05---Net基础加强

    接口 public class Program { static void Main(string[] args) { IFlyable sp = new SupperMan(); sp.Fly(); ...

  2. 一天弹出一次广告cookie

    function setCookie(name, value, expire) { window.document.cookie = name + "=" + escape(val ...

  3. android环境搭建——工欲善其事,必先利其器 2

    前两天鼓捣android, 搭建环境,不想麻烦就用了  adt-bundle-windows-x86-20140702. rar , 起个模拟器哇塞,太爽了. 出去转一圈唠会回来正好启动成功!有个网友 ...

  4. 【py网页】urllib.urlretrieve远程下载

    下面我们再来看看 urllib 模块提供的 urlretrieve() 函数.urlretrieve() 方法直接将远程数据下载到本地. 1 >>> help(urllib.urlr ...

  5. jquery tab键转换

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  6. 关键词:ACM & 大小端 & 面试官

    关于“ACM” fender0107401 :面试了一个在ACM拿过奖的人 我问了他几个问题: 读取数组中的一个元素,计算复杂度是多少,回答不清楚. 往链表里面存一个数,不排序的情况下,计算复杂度是多 ...

  7. copyallwaterdata

    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[copyallwaterdata]') and OBJECT ...

  8. Vmware 10安装MAC OS X 10.9备忘

    下载准备     Vmware 10     unlock-all-v120.zip (用以支持新建MAC)     MAC OS X 10.9 VMWARE.rar 已经安装完成的MAC系统虚拟机镜 ...

  9. Elasticsearch--数据索引

    前言 Elasticsearch可以支持全文检索,那么ES是以什么机制来支持的,这里索引就是一个重要的步骤,经过索引之后的文档才可以被分析存储.建立倒排索引.本篇就是以ES的数据检索操作来讨论的. 更 ...

  10. const修饰虚函数

    [1]程序1 #include <iostream> using namespace std; class Base { public: ; }; class Test : public ...