评论会员:kannan.gandhi 时间:2012/02/04
嗨,
下面的示例程序,在烧毛表插入和更新单个存储过程
CREATE PROCEDURE [dbo].[emp]
@emp_id varchar(max),@category varchar(max),@emp_cat varchar(max)
AS
BEGIN
SET NOCOUNT ON;
if exists(select * from emp_data where emp_id='''+@emp_id+''' and category='''+@category+''' and emp_cat='''+@emp_cat+''')
exec('UPDATE emp_data set emp_cat=''1231''')
else
exec ('Insert into emp_data(emp_id,category,emp_cat)Values('''+@emp_id+''','''+@category+''','''+@emp_cat+'''')
END
GO
感谢
卡纳安
www.steadfastglobal.com
评论会员:Vishal.Waman 时间:2012/02/04
First写INSERT查询比更新查询
{C}
评论会员:游客 时间:2012/02/04
查看imgsrc=或尝试{A1}]