The controlled release of a nectar by a cell or a tissue. Nectar is a fluid secreted by many angiosperms to promote pollination by providing a reward to pollinators. Nectar may also deter certain organisms from visiting or play other biological roles. Nectar is a complex solution that may include the following types of compounds: sugars, amino acids, organic acids, alkaloids, flavonoids, glycosides, vitamins, phenolics, metal ions, oils, free fatty acids, and proteins.