Well the syntax you're using is completely wrong. When adding parameters to your stored procedure you don't use the word IN anywhere. Also, you're declaring local variables then setting them to the parameters you declare for your procedure, this is unnecessary and using unneeded resources. Next, parameters for stored procedures need to be prefaced with the
@ symbol. Here is how your stored procedure should look
sql
CREATE PROCEDURE MyProcedure @ID INT, @NAM VARCHAR(50),@Phone VARCHAR(15)
AS
INSERT INTO
MyTable
VALUES (@ID, @NAM, @Phone)
That will work if you only have 3 columns in this particular table. If you have more (and are only inserting three values) then you will need to list the columns you're inserting after the table name, like so
sql
CREATE PROCEDURE MyProcedure @ID INT, @NAM VARCHAR(50),@Phone VARCHAR(15)
AS
INSERT INTO
MyTable(Column1, Column2, Column3)
VALUES (@ID, @NAM, @Phone)
Keep in mind that the names
Column1,
Column2 and
Column3 would need to be replaced with the actual names of your columns. Hope this helps