zoukankan      html  css  js  c++  java
  • 存储过程

    use TEST

    go

    if exists(select * from sysobjects where name='sp_query_bankMoney')

    drop procedure sp_query_bankMoney

    go

    create procedure sp_query_bankMoney

    as

    select * from bankMoney

    go

    execute sp_query_bankMoney

    go

    create proc insert_bank @id int,@userid nvarchar(50),@sex nchar(10),@bankmoney int,

    @total int output

    with encryption

    as insert into bankMoney(id,userid,sex,bmoney) values(@id,@userid,@sex,@bankmoney) select @total=sum(bmoney)from bankMoney where userid='zhangsan' go

    declare @total_price int 

    exec insert_bank '004','Zhangsan','男',100,@total_price output     

    print '总余额为'+convert(varchar,@total_price) go 

  • 相关阅读:
    harbor docker
    dns服务器
    k8s
    frps
    svn 搭建
    phpstrom 破解 转载https://www.jianshu.com/p/e71361b3bfee
    公开课
    k8s
    rsync各种备份
    定时任务
  • 原文地址:https://www.cnblogs.com/zhang-wenbin/p/5647109.html
Copyright © 2011-2022 走看看