I am passing table field name as parameter to stored procedure but stored procedure take field name as value instead of field name and throws error.
e.g if i pass va
You can use prepared statements, for example -
CREATE `VSK_Comments_UpdateAction`(IN FieldName varchar(30),IN FieldValue tinyint,CID bigint)
BEGIN
SET @query = CONCAT('Update comments Set ', FieldName, '=? WHERE commentid=?');
PREPARE stmt FROM @query;
SET @FieldValue = FieldValue;
SET @CID = CID;
EXECUTE stmt USING @FieldValue, @CID;
DEALLOCATE PREPARE stmt;
END;