create PROCEDURE b2(in c_year int,in co int)
begin
declare num int;
if exists(select * from class where class="c_year") then
update class set code=code+1 where class="c_year";
else
insert into class(class,code)values(c_year,1);
end if;
select code into num from class where class="c_year";
select CONCAT(c_year,'0',co,lpad(num,3,0)) as code_a;

end;

最新文章

  1. pyqt4:在线程Qthread中使用定时器Qtimer
  2. oracle数据库如何创建表空间,临时表空间
  3. javascript最容易混淆的作用域、提升、闭包
  4. Markov Random Fields
  5. 怎么清除SVN密码,以及重置eclipse中svn插件密码
  6. android项目 之 记事本(6)----- 加入手写
  7. 在tornado中使用celery实现异步任务处理之中的一个
  8. ASP.NET Core 2.0 使用支付宝PC网站支付
  9. (转)举例讲解JAVA中的堆和栈
  10. 华为机试题【10】-求数字基root
  11. show()封装没有想象中那么简单
  12. postman Could not get any response。
  13. 33.Odoo产品分析 (四) – 工具板块(4) – 问题追踪及群发邮件营销(1)
  14. js积累点
  15. Ubuntu安装UFW防火墙
  16. Linux下开发python django程序(django数据库多对多关系)
  17. ubuntu 开机自动挂在windows下的分区
  18. Rancher的安装配置
  19. 自动删除 Elasticsearch 索引
  20. SOE不能进入断点调试

热门文章

  1. Code Forces 1030E
  2. Python中字符串有哪些常用操作?纯干货超详细
  3. Rust之路(0)
  4. 机器学习:集成学习:随机森林.GBDT
  5. python 使用pyinstaller打包程序
  6. 基于python常用排序与查找
  7. Python 面向对象(1): 类方法基础
  8. spring boot:spring security用mysql实现动态权限管理(spring boot 2.3.3)
  9. List<String>转换为实体类的属性【转】
  10. flutter——android报错建议Suggestion: add 'tools:replace="android:label"'