When writing data to the database the following SQL datatypes are supported.
For backwards compatibility only, an atom is also accepted, but
note that the atoms
 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".
0for false, or
date(Year, Month, DayOfMonth), as above.
time(Hour, Minute, Second), as above.
timestamp(Year, Month, Day, Hour, Minute, Second, Fraction), as above.
SQL_BINARYand other binary types
SQL_INTERVAL_HOURand other interval types
SQL_SMALLINT, the result is undefined. Note that atoms with names that start with an upper case letter, like
SQL_CHARmust be quoted in Prolog, e.g.