SQL Formatter Options
Options
Keywords
The Upper/Lower Case settings in the SQL Formatter Tool allow you to define the case style for your SQL code. These options are useful for maintaining a consistent style across queries, improving readability, and adhering to organizational standards.
Available Options
Complete SQL
- Determines whether the entire SQL statement is transformed to a specific case or remains unchanged.
- Options:
- No Change: Retains the original case of the SQL code.
- UPPERCASE: Converts the entire SQL statement to uppercase.
- lowercase: Converts the entire SQL statement to lowercase.
Keywords
- Specifies how SQL keywords (e.g.,
SELECT
,FROM
,WHERE
) are displayed. - Options:
- No Change: Retains the original case of the keywords.
- UPPERCASE: Converts all keywords to uppercase.
- lowercase: Converts all keywords to lowercase.
- Specifies how SQL keywords (e.g.,
Non Keywords
- Specifies how non-keyword elements (e.g., table names, column names, aliases) are displayed.
- Options:
- No Change: Retains the original case of non-keyword elements.
- UPPERCASE: Converts all non-keywords to uppercase.
- lowercase: Converts all non-keywords to lowercase.
My Upper/Lower Case Keywords
- Allows you to define custom keywords that should follow specific case rules.
- Useful for custom functions, proprietary keywords, or domain-specific terms that aren’t standard SQL keywords.
How to Use These Settings
Choose a Case Rule:
- Use the dropdown menus to select case preferences for the entire SQL, keywords, and non-keywords.
Add Custom Keywords:
- Enter custom keywords in the My Upper/Lower Case Keywords section. These keywords will follow the same case rule as standard SQL keywords.
Save in Profiles:
- Assign specific settings to different profiles (e.g., Profile 1, Profile 2) to accommodate different styles for projects or teams.
Tips for Optimal Usage
- Maintain Consistency: Use UPPERCASE for keywords if working in environments where readability or legacy SQL styles are a priority.
- Adapt for Readability: Use lowercase for non-keywords to distinguish them from keywords easily.
- Leverage Profiles: Assign different case rules to profiles for quick switching between styles.
By configuring these settings, you can standardize the appearance of your SQL code, ensuring it is both visually appealing and aligned with your organization’s formatting standards. For additional assistance, refer to the user manual or contact support.