IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_prd_modify_0]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_prd_modify_0]
GO
-- 生成时间:2018-06-13 10:55:33 by ebs-core  
CREATE  procedure [dbo].[mps_prd_modify_0](
     @prdid bigint, 
     @idname varchar(50), 
     @text text ) 
as  
begin  
declare @id3 bigint 
select top 1 @id3 = prd3_id from mps_prd_0 where prd3_prdid = @prdid  and prd3_idname=@idname 
set @id3 = isnull(@id3, 0) 
if (@id3 = 0) 
begin 
insert into mps_prd_0(prd3_prdid, prd3_idname, prd3_text) values(@prdid, @idname, @text) 
end else 
begin 
update mps_prd_0 set prd3_text = @text where prd3_id = @id3 
end 
end