# Predefined rules

Telosys provides predefined rules to generate SQL for the most common databases.

To use them, simply indicate the database type in the template file (.vm).

The target database can be specified using the following directive :

```
#set ( $env.database = 'databaseType' )
```

Since version 4.0 Telosys has the following predefined database types:

* **POSTGRESQL**&#x20;
* **MYSQL**&#x20;
* **ORACLE**&#x20;
* **SQLSERVER**&#x20;
* **ANSISQL**  (for standard ANSI-SQL )

The predefined database types are not case sensitive.

Examples:

```
#set ( $env.database = 'postgresql' )
#set ( $env.database = 'PostgreSQL' )
#set ( $env.database = 'POSTGRESQL' )
```

If you try to use an unknown database name, an error will occur.


---

# 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://doc.telosys.org/target-sql-scripts/predefined-rules.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.
