# The &lt;%...%&gt; syntax

This syntax can span lines. The following list points out what you can do with this syntax and what you should pay attention to.

* You can define new variables, use Java logical code like if, for and while, and also get parameter values.

  For example, if you want to get the FILE\_Name parameter, use the code as follows:

```
<%
String filename = __FILE_NAME__;
%>
```

* This syntax cannot be used within an SQL statement. In other words, it should be used between two separated SQL statements.

  For example, the syntax in the following code is valid.

```
#sql sentence
DROP TABLE temp_0;
<%
#loop
for(int i=1; i<10; i++){
%>
#sql sentence
DROP TABLE temp_<%=i %>;
<%
}
%>
#sql sentence
DROP TABLE temp_10;
```

In this example, the syntax is used between two separated SQL templates: DROP TABLE temp\_0; and DROP TABLE temp\_&lt;%=i%&gt;;.

The SQL statements are intended to remove several tables beginning from temp\_0. The code between &lt;% and %&gt; generate a sequence of number in loop to identify tables to be removed and close the loop after the number generation.

* Within this syntax, the &lt;%=...%&gt; or &lt;/.../&gt; syntax should not be used.

&lt;%=...%&gt; and &lt;/.../&gt; are also syntax intended for the SQL templates. The below sections describe related information.

Information noteNote:

Parameters that the SQL templates can access with this syntax are simple. They are often used for connection purpose and can be easily defined in components, such as TABLE\_NAME, DB\_VERSION, SCHEMA\_TYPE, etc.