Home > DeveloperSection > Forums > How to create stored procedure in sqlserver for insert statement.
Ankit Singh

Total Post:341

Posted on    October-26-2015 10:21 PM

 .NET SQL Server 

 1 Reply(s)
 485  View(s)
Rate this:
Can anyone please help me how to solve this problem.

aditya kumar Patel

Total Post:254

Posted on    October-26-2015 10:38 PM

--let’s start querying create a table.

  CREATE TABLE UserMasters(        UserId int IDENTITY(1,1) primary key,

       LoginName nvarchar(100) ,

       password nvarchar(100) ,

       UserName nvarchar(100)  


 --Now start querying create a procedure for insert data.

 alter procedure sp_InsertUserMasters


@LoginName nvarchar(100) ,

       @password nvarchar(400) ,

       @UserName nvarchar(400)  




 insert into UserMasters (LoginName,password,UserName) values(@LoginName,@password,@UserName)


 --Now start querying create use procedure for insert data.

 exec sp_InsertUserMasters 'kavita@hotmail.com','kavita$%2015','kavita Patel'

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

Follow MindStick