If I have a table with Field 1, Field 2, Field 3, Field 4 and for one instance need just Field 1 and Field 2, but another I need Field 3 and Field 4 and yet another need all of them…
Is it better to have a SP for each combination I need or one SP that always returns them all?
If I have a table with Field 1, Field 2, Field 3, Field 4
Share
Very important question:
Writing many stored procs that run the same query will make you spend a lot of time documenting and apologising to future maintainers.
For every time anyone wants to introduce a change, they have to consider whether it should apply to all stored procs, or to some or to one only…
I would do only one stored proc.