Home > DeveloperSection > Forums > How to create stored procedure in sql server .
Ankit Singh

Total Post:341

Points:2389
Posted on    October-24-2015 7:08 AM

 MSSQL Server Database  MSSQL Server  SQL Server  SQL 
Ratings:


 1 Reply(s)
 528  View(s)
Rate this:

Can anyone please help me how to solve this problem.



aditya kumar Patel

Total Post:250

Points:1782
Posted on    October-24-2015 7:10 AM



      --let’s start querying create a table.

CREATE TABLE UserMasters(

       UserId int IDENTITY(1,1) primary key,

       LoginName nvarchar(max) ,

       password nvarchar(max) ,

       UserName nvarchar(max)

  )

 --Now start querying create a procedure.

 create procedure sp_GetUserMasters

 as

 begin

 select * from UserMasters

 end

--Now start querying execute a procedure.

 exec sp_GetUserMasters


Don't want to miss updates? Please click the below button!

Follow MindStick