Create robust stored procedures with error handling
Create a stored procedure for this functionality:
**Purpose:** {{PROCEDURE_PURPOSE}}
**Input Parameters:** {{INPUT_PARAMETERS}}
**Output Requirements:** {{OUTPUT_REQUIREMENTS}}
**Business Logic:** {{BUSINESS_LOGIC}}
**Database System:** {{DATABASE_SYSTEM}}
Please provide:
1. Complete stored procedure code with:
- Parameter validation
- Transaction management
- Error handling and logging
- Proper return values/result sets
2. Documentation comments
3. Usage examples
4. Unit test cases
5. Performance considerations
6. Security considerations (SQL injection prevention)Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{PROCEDURE_PURPOSE][{INPUT_PARAMETERS][{OUTPUT_REQUIREMENTS][{BUSINESS_LOGIC][{DATABASE_SYSTEM]