Learning Store procedure and debug in SQL Server 2008
来源:互联网 发布:计算机网络视频知乎 编辑:程序博客网 时间:2024/05/16 18:03
First store procedure:
USE [TourReseller]
GO
/****** Object: StoredProcedure [dbo].[usp_users_login] Script Date: 03/23/2011 17:01:12 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[usp_users_login] (
@username varchar(250),
@password varchar(250),
@emailid varchar(250),
@ret int output
)
AS
Begin
set @ret=0;
select @ret=1
from users
where (userName=isnull(@username,null) or [email]=isnull(@emailid,null)
and [password]=@password);
End
Cool! So now we need to call the procedure and get return value....
DECLARE @ret int
EXEC dbo.usp_users_login 'Admin','admin','',@ret OUTPUT
SELECT @ret
How to debug?
You can not just step into a created procedure, you need to debug during calling the procedure.
You could put break point in the short paragragh above that calls the store procedure usp_users_login, and at the second sentence F11 to step in to the store procedure, to do the debug step by step! Really useful trick~
- Learning Store procedure and debug in SQL Server 2008
- sql server store procedure summary part1
- SQL Debug && Stored Procedure Debug ----- SQL Server Management Studio
- 关于在[SQL Server]Store Procedure中使用OUTPUT 游标
- Image store in SQL-Server 2005 database and retrieve it in asp.net application with C#:
- Use Store Procedure in JPA
- sql: table,view,function, procedure created MS_Description in sql server
- sql: table,view,function, procedure created MS_Description in sql server
- Debug stored procedure in VS2005
- Dynamic 'Sales by Week' Procedure in SQL Server
- 查询Sql server数据死锁和阻塞的一个Store procedure...
- 如何在SQL Server查询语句(Select)中检索存储过程(Store Procedure)的结果集?(
- Sql store procedure partten 存储过程样式
- Sql Server - How to write a Stored procedure in Sql server
- store Procedure
- store procedure
- SQL in ORACLE and SQL Server
- pager procedure for sql server
- 致10年后的你
- 那些女子(二)
- 定制vim开发环境
- itco-wdt.c
- CSDN限制的时间太长啦!
- Learning Store procedure and debug in SQL Server 2008
- Web Services 分布式实战
- Android Smart Dict - 数据库设计
- Linux下用Firefox的插件阅读CHM格式文件的方法
- Design Pattern-Strategy Pattern 设计模式之策略模式
- 哦……std::bad_alloc
- vs2008中的jQuery智能提示
- 股票软件开发基础
- linux c for()