Sunan an-Nasa'i, Book 35, Hadith 27 (In-Book) ⓘ
It was narrated that 'Adiyy bin Hatim said: "The Messenger of Allah said: 'Whoever swears an oath, then sees something better than it, let him do that which is better and leave his oath.'"
أَخْبَرَنَا عَمْرُو بْنُ يَزِيدَ، قَالَ حَدَّثَنَا بَهْزُ بْنُ أَسَدٍ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنِي عَبْدُ الْعَزِيزِ بْنُ رُفَيْعٍ، قَالَ سَمِعْتُ تَمِيمَ بْنَ طَرَفَةَ، يُحَدِّثُ عَنْ عَدِيِّ بْنِ حَاتِمٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَنْ حَلَفَ عَلَى يَمِينٍ فَرَأَى خَيْرًا مِنْهَا فَلْيَأْتِ الَّذِي هُوَ خَيْرٌ وَلْيَتْرُكْ يَمِينَهُ " .
also referenced under: Hadith 3787 (Reference) & Volume 4, Book 35, Hadith 3818 (DarusSalam)