# SQL Operator

SQLOperator 原理是通过与特定的数据库建立连接，然后在该数据库执行该数据库所支持的命令，如 SQL 语句，以实现远程对数据库的操作的功能。

### **Source**

#### **Data Source**

要连接的数据库，现在主要支持以下几种类型的数据库：

* MySQL
* TiDB
* Redshift
* Hive\&Impala
* HBase
* ClickHouse

> 注意对于同一种类型数据库，但数据库地址不一样，在这里是不一样的，这里是具体到某一个实际的数据库，而不是某一类型，具体的数据库信息详见连接源管理。

#### **Database**

要操作的数据库，只需要填写数据库的名字，若输入了 *test* ，任务执行的时候相当于运行了 *use test;* 命令。

#### **SQL Query**

要执行的SQL语句，支持多条 SQL 语句，用分号分开即可，支持传入变量。

> 这个板块内输入的内容可以看成一个事务，执行完最后一条 SQL 语句后会自动 commit。

#### **Auto Commit**

默认不勾选，勾选后 SQL Query 内每一条 SQL 语句执行完成后都会自动 commit 一次。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reorc.com/cn-reorc-help-center/shu-ju-guan-dao/gao-ji-guan-dao/jie-dian-lei-xing/sql-operator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
