> For the complete documentation index, see [llms.txt](https://koseungbin.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://koseungbin.gitbook.io/wiki/books/undefined-1/dbms/sql.md).

# SQL과 관리 명령의 차이

## 관리 명령이란

많은 DBMS는 SQL 이외에도 다양한 용도의 명령어를 준비해 두고 있는데, 해당 책에서는 '관리 명령' 이라고 지칭하겠다.

{% tabs %}
{% tab title="MySQL이 가동된 시점부터의 경과시간(초)" %}

```sql
mysql> show status like 'Uptime';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Uptime        | 26    |
+---------------+-------+
1 row in set (0.00 sec)
```

{% endtab %}

{% tab title="MySQL이 실행한 SQL 문의 수" %}

```sql
mysql> show status like 'Queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Queries       | 5     |
+---------------+-------+
1 row in set (0.01 sec)
```

{% endtab %}
{% endtabs %}

## 관리 명령에서 기억해야 할 점

관리 명령은 DBMS 가 정상적으로 동작하는지 감시하거나 DBMS 가 이상한 동작을 할 때 문제 해결을 위해 정보수집 용도로 사용한다. 관리 명령에서 중요한 점은 다음의 2 가지이다.

* DBMS는 SQL 문 이외에도 '관리 명령' 이 있다.
* 관리 명령의 종류나 문법은 DBMS 에 따라 다르다.

SQL 문과 관리 명령을 구분하는 방법은 다음과 같다.

* SQL 문은 반드시 'SELECT, INSERT, DELETE, UPDATE' 중 하나의 단어로 시작한다.
* 이 외의 단어로 시작한다면 관리 명령이다.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://koseungbin.gitbook.io/wiki/books/undefined-1/dbms/sql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
