Quick Answer
Stored routine (procedure or function) encapsulates SQL logic in the database. Benefits: network efficiency (multiple SQL statements executed in one call), reusability across applications, security (grant EXECUTE without table access), consistency (business rules enforced at DB level). Downsides: difficult to version control, unit test, and debug. Modern practice favors application-layer logic with ORMs.
Answer
Stored routines include procedures and functions that store logic on the server, reducing network usage and improving consistency.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.