You are on page 1of 3

Select Procedure(Grid)

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[All_select_grid_reg]
AS SELECT [id],[doc],[title],[nam],[dob],[email],[pro],[city],[mobno]
FROM reg order by id desc

Select Procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[All_select_reg]
(
@nam1[varchar](30)
)
AS
SELECT [id],[doc],[title],[nam],[dob],[email],[pro],[city],[mobno]
FROM
reg
where
(
[nam]=@nam1
)
order by id desc

Delete Procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[delete_grid_data]
(
@del_id [int]
)
As Delete from reg
where(id=@del_id)

Inset Procedure

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[insert_regs_1]
(@doc1
[datetime],
@title1
[varchar](5),
@nam1[varchar](30),
@dob1[datetime],
@email1[varchar](30),
@pro1[varchar](30),
@city1[varchar](20),

@mobno1[varchar](15),
@autogen1[varchar](50)
)
AS INSERT INTO [reg]
(
[doc],
[title],
[nam],
[dob],
[email],
[pro],
[city],
[mobno],
[autogen]
)
VALUES

( @doc1,
@title1,
@nam1,
@dob1,
@email1,
@pro1,
@city1,
@mobno1,
@autogen1
)

Update Procedure
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[update_grid_reg]
(
@id1 [int],
@nam1
[varchar](30),
@dob1
[varchar](20),
@email1 [varchar](30),
@pro1 [varchar](30),
@city1 [varchar](20),
@mobno1 [varchar](15)
)
AS UPDATE [reg]
SET

WHERE

[nam]
= @nam1,
[dob]
= @dob1,
[email] = @email1,
[pro] = @pro1,
[city] = @city1,
[mobno] = @mobno1

( [id]

= @id1)