# 代码样式。 SQL

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 设置 | 编辑器 | 代码样式 | SQL`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 编辑器 | 代码样式 | SQL`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)

在此页面中，选择要为其配置代码样式设置的 SQL 方言。

有关配置 SQL 风格的更多信息，请在 [配置 SQL 代码样式](configure-the-sql-code-style.html) `Ctrl+Alt+L` (Windows), `⌘ ⌥ L` (macOS), `⌘ ⌥ L` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ L` (macOS System Shortcuts), `Ctrl+Alt+L` (XWin), `Ctrl+Alt+L` (GNOME), `Alt+Shift+L` (KDE), `Ctrl+Alt+L` (Emacs), `Ctrl+Alt+L` (Sublime Text), `⌘ ⌥ L` (Sublime Text (macOS)), `Ctrl+Alt+Enter` (Visual Studio), `⌘ ⌥ ⏎` (Visual Studio (macOS)), `Alt+Shift+F` (NetBeans), `Ctrl+Alt+L` (Eclipse), `⌘ ⇧ F` (Eclipse (macOS)) 中阅读。

对于每种 SQL 方言，可用的代码样式设置如下：

|  条目  |  描述  |
| --- | --- |
|  [大小写](code-style-sql-case.html)  |     更改单词大小写选项。     |
|  [查询](code-style-sql-queries.html)  |     配置  `INSERT` 、  `UPDATE` 、  `WITH` 、  `SELECT` 、  `FROM`  和其他查询结构的代码样式。     |
|  [DDL](code-style-sql-ddl.html)  |     为  `CREATE` 、  `ALTER` 、视图、约束和其他 DDL 结构配置代码样式。     |
|  [代码](code-style-sql-code.html)  |     为声明的变量、例程参数、例程语句、循环和其他结构配置代码样式。     |
|  [表达式](code-style-sql-expressions.html)  |     为元组、二元表达式、  `案例`  子句和过程调用配置代码样式。     |
|  [制表符和缩进](code-style-sql-tabs-and-indents.html)  |     配置代码样式的缩进、制表符和空格字符。     |
|  [换行](code-style-sql-wrapping.html)  |     配置在重新格式化代码时保留哪些格式。     |
|  [代码生成](code-style-sql-code-generation.html)  |     配置索引、主键和外键的代码生成行为。     |

## See also

### 过程

[代码样式方案](configuring-code-style.html)

