Skip to content

Add SQL development guidelines and best practices to instructions #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ambilykk
Copy link
Contributor

@ambilykk ambilykk commented Jul 5, 2025

Pull Request Checklist

  • [x ] I have read and followed the CONTRIBUTING.md guidelines.
  • [ x] My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • [ x] The file follows the required naming convention.
  • [ x] The content is clearly structured and follows the example format.
  • [ x] I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • [ x] I have run node update-readme.js and verified that README.md is up to date.

Description

Add a new Copilot Instruction file with Guidelines for generating SQL statements and stored procedures. This can be used for converting ER diagrams into Schema generation scripts or can be used for generating new SQL Schema or stored procedures based on best practices.

Type of Contribution

  • [ x] New instruction file.
  • New prompt file.
  • New chat mode file.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@Copilot Copilot AI review requested due to automatic review settings July 5, 2025 06:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Copilot instruction file for SQL development guidelines and updates the README to include it.

  • Adds instructions/sql-sp-generation.instructions.md with best practices for schema design, SQL coding style, stored procedures, security, and transactions
  • Updates README.md to reference the new SQL Development instructions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
instructions/sql-sp-generation.instructions.md New instruction file outlining SQL and SP guidelines
README.md Added entry for SQL Development instructions
Comments suppressed due to low confidence (2)

instructions/sql-sp-generation.instructions.md:64

  • [nitpick] The guidelines recommend both using prepared statements for dynamic SQL and avoiding dynamic SQL in stored procedures, which conflicts. Please clarify when dynamic SQL is acceptable and adjust the wording.
- use prepared statements when executing dynamic SQL

instructions/sql-sp-generation.instructions.md:39

  • Using the 'sp_' prefix can lead to lookup performance issues in some SQL engines (e.g., SQL Server searches master DB first). Consider a different naming convention to avoid that.
- prefix stored procedure names with 'sp_'

@@ -0,0 +1,74 @@
---
description: 'Guidelines for generating SQL statements and stored procedures'
Copy link
Preview

Copilot AI Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] There’s an extra space between 'generating' and 'SQL' in the description; please remove the duplicate space for consistency.

Suggested change
description: 'Guidelines for generating SQL statements and stored procedures'
description: 'Guidelines for generating SQL statements and stored procedures'

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant