📝

Stored Procedure Writer

Verified

by Community

Assists in writing stored procedures, functions, and triggers for PostgreSQL, MySQL, and SQL Server. Covers input validation, error handling, transaction management, and performance considerations for server-side database logic.

storedproceduresfunctionstriggersdatabasesql

Stored Procedure Writer

Write well-structured stored procedures, functions, and triggers with proper error handling and transaction management.

Usage

Describe the database logic you need and this skill will write the appropriate stored procedure or function.

Examples

  • "Create a stored procedure to transfer funds between accounts atomically"
  • "Write a PostgreSQL function to calculate running totals"
  • "Build a trigger that maintains an audit log of row changes"

Guidelines

  • Always include proper error handling and rollback logic
  • Validate input parameters at the start of the procedure
  • Use appropriate isolation levels for transactional operations
  • Comment complex logic for maintainability
  • Consider performance implications of row-level triggers