Well obviously using stored procedures has several advantages over constructing SQL in code.
- Your code implementation and SQL become independent of each other.
- Code is easier to read.
- Write once use many times.
- Modify once
- No need to give internal details to the programmer about the database. etc , etc.