Inserting Data Into Two Tables in sql server Stored Procedures
CREATE PROCEDURE procInsSamples
@CategoryID int,
@Title varchar(100),
@Description text,
@Link varchar(150),
@Whatever
AS
Begin
Set NoCount on
DECLARE @WhateverID INT
Insert Table1(Title,Description,Link,Whatever)
Values
(@title,@description,@link,@Whatever)
Select @WhateverID=@@Identity
Insert into Table2
(CategoryID,WhateverID)
Values
(@CategoryID,@WhateverID)
End
this Data will Get from http://aspnet101.com/aspnet101/tutorials.aspx?id=13
@CategoryID int,
@Title varchar(100),
@Description text,
@Link varchar(150),
@Whatever
AS
Begin
Set NoCount on
DECLARE @WhateverID INT
Insert Table1(Title,Description,Link,Whatever)
Values
(@title,@description,@link,@Whatever)
Select @WhateverID=@@Identity
Insert into Table2
(CategoryID,WhateverID)
Values
(@CategoryID,@WhateverID)
End
this Data will Get from http://aspnet101.com/aspnet101/tutorials.aspx?id=13
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home