This collection contains organized prompts for various database operations and query scenarios. Each prompt is designed to help you get the most effective assistance when working with databases.
- analyzing-query-breakdown.md - Break down complex queries to understand their components
- debugging-syntax-errors.md - Fix syntax errors in SQL queries
- query-optimization-efficiency.md - Improve query performance and efficiency
- execution-plan-analysis.md - Analyze and interpret query execution plans
- writing-query-specific-scenario.md - Create queries for specific business scenarios
- complex-scenarios-constraints.md - Handle complex requirements with multiple constraints
- joining-multiple-tables.md - Write efficient multi-table join queries
- removing-records.md - Safely delete records from tables
- altering-table-attributes.md - Modify table structure (add/modify columns)
- renaming-table-safely.md - Rename tables without breaking dependencies
- creating-table-backup.md - Create comprehensive table backups
- querying-table-summary.md - Generate table summaries and statistics
- scheduling-automated-backups.md - Set up automated backup processes
- archiving-old-data.md - Archive historical data efficiently
- data-sampling.md - Extract representative data samples
- identifying-duplicate-data.md - Find and manage duplicate records
- Choose the right prompt based on your specific need
- Replace the variables in curly braces
{variable}with your actual values - Customize the prompt if needed for your specific situation
- Use with your preferred AI assistant for database help
Most prompts use these common variables:
{technology}- Your database system (MySQL, PostgreSQL, SQL Server, etc.){table_name}- Name of the table you're working with{query}- The SQL query in question{constraints}- Any limitations or requirements{objective}- What you want to accomplish
- Be as specific as possible when replacing variables
- Include relevant schema information when available
- Mention any performance or security requirements
- Provide error messages exactly as they appear
- Include sample data structure when helpful
Feel free to modify these prompts to better suit your specific database environment or use cases.
Created: June 10, 2025