There is one article in this blog in which we had discussed about how to use INSERT statement in various aspects. Here is one more example to insert the data into the table through a stored procedure.
/**************************/
/* Existing Table Data *//**************************/
/**************************/
SELECT * FROM Customers
/**************************/
/* Procedure Creation */
/**************************/
CREATE PROCEDURE sampleProc (
@CustomerID INT,
@CustomerName VARCHAR(50),
@ActiveStatus INT)
AS
SELECT @CustomerID, @CustomerName, @ActiveStatus
**************************/
/* Procedure Ends Here*/
/**************************/
/**************************/
/* Insert Data */
/**************************/
INSERT INTO Customers
EXEC sampleProc 500, 'Harry', 1
No words to Praise you!
ReplyDeleteThank you very much Mr. Shafi for such a useful and informative blog. You'll be blessed by GOD for such an extraordinarly hard work.