,
Share with your friends 

Stored procedure In SQL SERVER 2005

6 ratings Views 218 
Author: PREMKUMAR_d1fef07a (PREMKUMAR R)  View Profile |  View other solutions by this author

Question / Problem


Insert Records using Stored Procedure?

Solution

// step 1:First Create database
create database Premkumar
//step 2: Create table
create table student(sno int, sname varchar(15), Age int, City varchar(15))
//step 3: Create Procedure
create procedure inser
@sno int, @sname varchar(15), @age int, @city varchar(15)
as
begin
insert into values (sno, sname, age , city) values (@sno, @sname,@age,@city)

end
exec inser 1, 'Prem', 21, 'Chengalpat'

Applies to

Microsoft SQL Server 2005

Rank It

Login to rank it

Report


Advertisement