# 智能键设置：SQL

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/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)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

使用此设置页面配置 SQL 中的打字辅助功能。

有关 CLion 中 SQL 支持的更多信息，请参阅 [数据库工具和 SQL](relational-databases.html)。

|  项  |  描述  |
| --- | --- |
|  在输入时插入字符串串联符号  |     如果您正在使用的 DBMS 支持多行字符串文字，您可能需要关闭此选项：       假设有以下 PostgreSQL 片段  `文本` 值  `notes` :       ```SQL SET notes = 'Lightest element' ```      光标位于单词  `element` 前面。       如果该选项开启，并且您按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))，则片段将更改为：       ```SQL SET notes = 'Lightest ' \|\| 'element' ```      否则，该片段将变为：       ```SQL SET notes = 'Lightest element' ```    |
|  在按 Enter 键时关闭代码块  |     当您以开头关键字（BEGIN、LOOP、BEGIN TRY 等）开始代码块并按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) 时，代码块将以相应的结束关键字（END、END LOOP、END TRY 等）关闭。      ![在按 Enter 键时关闭代码块](https://resources.jetbrains.com/help/img/idea/2026.3/db_close_code_blocks_on_enter.animated.gif)  |

