【SQL开源代码栏目提醒】:网学会员鉴于大家对SQL开源代码十分关注,论文会员在此为大家搜集整理了“proc_insertStorage.sql”一文,供大家参考学习
use db_SMS
go
if object_Id('proc_insertStorage') is not null
drop proc proc_insertStorage
go
create proc proc_insertStorage
(
@StoreName varchar (100),
@StorePeople varchar (20),
@StorePhone varchar (20),
@StoreUnit varchar (100),
@StoreRemark varchar (1000)
)
as
if exists(select * from tb_Storage where StoreName=@StoreName)
begin
return 100
end
else
begin
insert into tb_Storage(StoreName,StorePeople,StorePhone,StoreUnit,StoreRemark)
values(@StoreName,@StorePeople,@StorePhone,@StoreUnit,@StoreRemark)
end
go