I have a stored procedure for insert operation.I tried the following but it gives me error.
ALTER PROCEDURE SetStaffSalary
@staffid int =0,
@amount int
there's no "where" on insert syntax. example :
insert into account (staffid, salary) values (@id, @salary);
or you could use update syntax to update the data.
update account set salary = @salary where staffid = @id;
try it like this - it looks like you want t do update
ALTER PROCEDURE setstaffsalary @staffid int = 0 ,
@amount int = 0
AS
BEGIN
UPDATE accstaff
SET totalsalary = @amount
WHERE fk_staffid
=
@staffid;
END;