Narrated Salama bin Al-Akwa`
The Prophet (ﷺ) passed by some people of the tribe of Bani Aslam who were practicing archery. The Prophet said, "O Bani Isma`il ! Practice archery as your father Isma`il was a great archer. Keep on throwing arrows and I am with Bani so-and-so." So one of the parties ceased throwing. Allah's Apostle said, "Why do you not throw?" They replied, "How should we throw while you are with them (i.e. on their side)?" On that the Prophet (ﷺ) said, "Throw, and I am with all of you."
Narrated Abu Usaid
On the day (of the battle) of Badr when we stood in rows against (the army of) Quraish and they stood in rows against us, the Prophet (ﷺ) said, "When they do come near you, throw arrows at them."