Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1946458
  • 博文数量: 424
  • 博客积分: 1291
  • 博客等级: 中尉
  • 技术积分: 2682
  • 用 户 组: 普通用户
  • 注册时间: 2012-08-13 01:34
个人简介

linux oracle 网络安全 编程

文章分类

全部博文(424)

文章存档

2016年(22)

2015年(53)

2014年(57)

2013年(242)

2012年(50)

分类: Oracle

2012-12-30 01:15:40

SQL> create or replace procedure sp_pro7(goodsnum char) is
  2  v_category goods.category%type;
  3  begin
  4  select category into v_category from goods where goodsid=goodsnum;
  5  if v_category='家具' then
  6  update goods set unitprice=unitprice-10 where goodsid=goodsnum;
  7  elsif v_category='fruit' then
  8  update goods set unitprice=(unitprice+1) where goodsid=goodsnum;
  9  else
 10  update goods set unitprice=(unitprice+100) where goodsid=goodsnum;
 11  end if;
 12  end;
阅读(1158) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~