# Lua Data Types

> Lua has a limited set of data types. The following table shows how eXtremeSQLdata types are represented in Lua:

> eX tremeSQL data type | Lua data type | Comments
> --- | --- | ---
> char(N), varchar(N) | String |
> TINYINT, SMALLINT, INT, INT(N), UNSIGNED(N), BIGINT | Number | Note that Lua language does not distinguish integers and floats. All are internally stored as 64-bit double values
> FLOAT, REAL, DOUBLE | Number |
> NUMERIC, DOUBLE | Number | Fixed-point values of type `Numeric` are converted to floating point `double` values when passed to a UDF. Note that a UDF return type of a fixed-point type is not supported.
> Date, time, timestamp | Number | Converted to integer value, compatible with `os.time()`
> Binary, varbinary, longvarbinary | String |
> REFERENCE | Not supported |
> BLOB | String | A `blob` can not be used as return value for a UDF.
> ARRAY | Table | A table can be created and passed to the UDF. And a table can be returned back.
> SEQUENCE | Userdata | A “handle” to the sequence is passed into UDF as userdata. This handle can be used in functions: `seqiter(it)`, `iseq()`, `iseqn()`