KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: System table column OLD_DATA_TYPE
PRODUCT: 4D SQL | VERSION: 12 | PLATFORM: Mac & Win
Published On: June 9, 2011

There is a system column OLD_DATA_TYPE that is available in the _USER_COLUMNS system table. The column type is a long integer and this column stores the 4D data type of a given column.

This value is different from the DATA_TYPE column, which represents the SQL data type of a given column. See the Tech Tip 4D Data Types in SQL System Tables for more information on the DATA_TYPE column.

Here is a table which shows the 4D field types and the corresponding values for DATA_TYPE and OLD_DATA_TYPE:

Field typeDATA_TYPEOLD_DATA_TYPE
Alpha100
BLOB18-1
Boolean16
Date84
Float7-7
Integer38
Integer 64 Bits5-5
Long Integer49
Picture123
Real61
Text102
Time911


This information can be used to extract information about a field, given its tablename and fieldname.

For more information on system tables see the 4D SQL Reference, "Principles for integrating 4D and the 4D SQL engine".

Note: This column was introduced in 11.2.