How to create stored procedure in sqlserver for insert statement.

Total Post:341

Points:2389
 701  View(s)
Ratings:
Rate this:
Can anyone please help me how to solve this problem.
  1. Post:279

    Points:1987
    Re: How to create stored procedure in sqlserver for insert statement.

    --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)  

     )

     as

     begin

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

     end

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

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

      Modified On Apr-10-2018 04:56:22 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!