We Recommend

SQL Cookbook SQL Cookbook
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.


Posted By

krisdb on 05/04/07


Tagged

sql


Versions (?)


stored proc template


Published in: SQL 


  1. SET ANSI_NULLS ON
  2. SET QUOTED_IDENTIFIER ON
  3. go
  4.  
  5.  
  6. CREATE PROCEDURE [dbo].[spName]
  7. @sUsername varchar(64),
  8. @sPassword varchar(64)
  9.  
  10. AS
  11.  
  12. BEGIN
  13. SET NOCOUNT ON;
  14.  
  15.  
  16. DECLARE @id int
  17.  
  18. SELECT @id = id FROM TABLE WHERE username = @sUsername AND password = @sPassword
  19.  
  20. END

Report this snippet 

You need to login to post a comment.