如何在SQL Server 2008中编写存储过程 [英] how to write stored procedure in sql server 2008

查看:61
本文介绍了如何在SQL Server 2008中编写存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,使用(``DeptID''自动提示,``状态''默认为True,``CreatedDate''getvalue())在网格视图中输入``DepartmentName'',如果重复相同的``DepartmentName''和``Status''=``True''消息记录存在....,如果从gridview(delete)中删除了它,则使``Status''=``False''然后再次将binddata仅在状态中显示"Status" ="True",如果存在"DepartmentName"并且"Status" ="False"记录应更新Make" Status" =' 'True'和'CreatedDate'= getDate()消息记录已保存....,如果它已更新,则gridView中的记录'CreatedDate'= getDate()和Msg记录已更新....,

所以我想知道如何编写存储过程,或者为我提供存储过程....任何帮助都将是可贵的.
在此先感谢.....

I have a text box, to enter ''DepartmentName'' into grid view using(''DeptID'' Auto increament, ''Status'' By Default True,''CreatedDate'' getvalue()),If it repeats the same ''DepartmentName'' and ''Status'' =''True'' Msg Record exists...., if it is deleted from gridview(delete) it make ''Status'' =''False'' and again binddata only ''Status'' =''True'' should display in grid, If ''DepartmentName'' exist and ''Status''=''False'' record should Update Make ''Status''=''True'' and ''CreatedDate''=getDate() Msg Record Saved...., if It is Updated records in gridView ''CreatedDate''=getDate() and Msg Record Updated....,

So I want to know how to write Stored procedure for it, or please provide me stored procedure for that.... any help will appreciable.
Thank in Advance.....

推荐答案


开头 http://msdn.microsoft.com/en-us/library/ms345415.aspx [ ^ ]
http://www.mssqltips.com/sqlservertutorial/160/sql-server-stored-procedure / [^ ]
http://www.quackit.com/sql_server/tutorial/ [
Start with
http://msdn.microsoft.com/en-us/library/ms345415.aspx[^]
http://www.mssqltips.com/sqlservertutorial/160/sql-server-stored-procedure/[^]
http://www.quackit.com/sql_server/tutorial/[^]


这篇关于如何在SQL Server 2008中编写存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆