Taste is an early stage in food and drink selection for most animals [1, 2]. Detecting sweetness indicates the presence of sugar and possible caloric content. However, sweet taste can be an unreliable predictor of nutrient value because some sugars cannot be metabolized. In addition, discrete sugars are detected by the same sensory neurons in the mammalian  and insect [4, 5] gustatory systems, making it difficult for animals to readily distinguish the identity of different sugars using taste alone [6-8]. Here we used an appetitive memory assay in Drosophila [9-11] to investigate the contribution of palatability and relative nutritional value of sugars to memory formation. We show that palatability and nutrient value both contribute to reinforcement of appetitive memory. Nonnutritious sugars formed less robust memory that could be augmented by supplementing with a tasteless but nutritious substance. Nutrient information is conveyed to the brain within minutes of training, when it can be used to guide expression of a sugar-preference memory. Therefore, flies can rapidly learn to discriminate between sugars using a postingestive reward evaluation system, and they preferentially remember nutritious sugars.