本文介绍了如何在SQL SERVER中编写存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好, EmployeeId, 用户名, 名, 姓氏, 用户类型, 部门, 名称, MobileNumber1, 市, 国家 这些是字段 选定值的存储过程是什么?
Hi alll, EmployeeId, UserName, FirstName, LastName, UserType, Department, Designation, MobileNumber1, City, Country these are the fields what is the stored procedure for selected value
推荐答案除了上述解决方案之外,这里还有一个简单的解决方案 创建过程ProcedureName ( @Id //Based on which you want to filter your details ) 如 SELECT FirstName,LastName,JobTitle,部门 // Your columns Name which you want to return FROM HumanResources // Your Table Name DeptId = @Id //Where Condition to filter your Result In addition to the Above Solution here is one simple solution create Procedure ProcedureName ( @Id //Based on which you want to filter your details ) as SELECT FirstName, LastName, JobTitle, Department // Your columns Name which you want to return FROM HumanResources // Your Table Name WHERE DeptId = @Id //Where Condition to filter your Result
在Internet上进行搜索,并通过一些教程编写存储过程. 试用msdn网站. 您可能还希望获取一些有关存储过程的基础书籍并仔细阅读. Do a search on the internet and go through some tutorials on writing stored procedures. Try out the msdn website. You might also want to pick up some basic books on stored procedures and go through them.
您需要学习如何创建存储过程,看看给定的链接 如何:创建存储过程 [ ^ ] 如何编写存储过程 [ ^ ]和 面向初学者的SQL Server存储过程 [ ^ ] You need to learn how to create Stored Procedure Take a look at given links How to: Create a Stored Procedure[^] How to Write Store Procedure[^] and SQL Server Stored Procedures for Beginners[^]
更多推荐
如何在SQL SERVER中编写存储过程?
发布评论