When writing data to the database the following SQL datatypes are supported.
SQL_CHAR, SQL_VARCHAR etc.For backwards compatibility only, an atom is also accepted, but
note that the atoms null and [] have special meaning
(as SQL null value and empty code list, respectively) and more
atoms with special meaning may be introduced in the future. For
compatibility with some ODBC drivers, the integer 0 and 1 are
allowed, meaning "0" and "1".
SQL_BIT0 for false, or 1 for true.
SQL_INTEGER, SQL_TINYINT, SQL_SMALLINT, etc.SQL_REAL, SQL_DOUBLE, SQL_FLOATSQL_DATEdate(Year, Month, DayOfMonth), as above.
SQL_TIMEtime(Hour, Minute, Second), as above.
SQL_TIMESTAMPtimestamp(Year, Month, Day, Hour, Minute, Second,
Fraction), as above.
null.
SQL_BINARY and other binary typesSQL_INTERVAL_HOUR and other interval typesSQL_UTCTIME and SQL_UTCDATETIMESQL_SMALLINT, the
result is undefined.
Note that atoms with names that start with an upper case letter,
like SQL_CHAR must be quoted in Prolog, e.g. 'SQL_CHAR'.