Abhi me

Abhi me

  • NA
  • 7
  • 832

Need to set parameters in stored procedures of sql server

Jul 3 2015 2:30 PM
Hello, 
 
I have task and i got struck with these SQL server Stored procedures. Am confused and not understanding on how to declare them and write the parameterss. Mainly the select statements for the functionality .
 
Please can one help me in writing these
 
following is the table showing stored procedures requirements
 

SP Name

Input Parameters

Output Parameters

Functionality

Sp_Insurance_UsernameExists

@username nvarchar(50)

@returnValue int

Should check if the passed in username exists in the webcrendetials table. IF exists, return 1 otherwise return 0

Sp_Insurance_InsertCustomer

All the columns of customer table except ID (as ID is an identity column) and also the columns of the Web Credentials table

@ID int

Should insert a row in the customer table and return the ID of the created row

Sp_Insurance_InsertCustomerOrder

All the columns from the order table and the ID of the customer who was inserted by the above stored proc.

@ID int

Insert the row in the order and return the order ID

 

Answers (8)