Most diabetic patients will require surgery at some time in their lives, and this presents problems for glycemic control. Surgery involves a period of starvation, and also the metabolic response to trauma includes counterregulatory hormone hypersecretion (e.g., adrenaline, cortisol, etc.), which opposes insulin action. The major factor influencing the management of diabetes during surgery is assessment of the patient's insulin reserves. Thus, those on insulin treatment (whether they are true type 1, or insulin‐treated type 2 patients) should be assumed to have little or no endogenous insulin reserves, and a system of continuous insulin and glucose delivery is necessary. Those not on insulin, however, clearly have their own insulin reserves and, provided they have reasonable preoperative glycemic control, for all but major surgery simple glycemic observation is usually all that is needed. Delivery of insulin and glucose may be by “separate lines” (intravenous (IV) glucose infusion with a separate IV insulin pump), or by a combined glucose–potassium–insulin infusion. The latter is easier to manage on lower‐staffed general wards, and the former is particularly flexible and suitable for critical care situations with more metabolically unstable patients and higher levels of staffing. Whichever system is used, patients must have regular blood glucose and plasma electrolyte monitoring, with appropriate insulin adjustments to maintain good glycemic control. With good preoperative control and assessment, and well organized and appropriate perioperative management, the risks of surgery in diabetic patients should in most cases be similar to nondiabetic rates.