KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to get Table and Field numbers
PRODUCT: 4D | VERSION: 11.1 | PLATFORM: Mac & Win
Published On: October 15, 2008

As mentioned in Tech Tip 49185, there are new commands in 4D to get information about Table and Field numbers. These changes are necessary because 4D v11 SQL supports the deletion of Tables and Fields.

This same information can be obtained via SQL as well. For example, to get a list of Table numbers the _USER_TABLES System Table can be used:

ARRAY LONGINT($tableNums;0)
Begin SQL
   SELECT Table_ID FROM _USER_TABLES INTO :$tableNums;
End SQL



Note: The _USER_TABLES table is a System Table maintained by 4D and exists in any 4D v11 SQL database. Also note that 4D v11 SQL Release 1 (11.1) or higher is required in order to query the System Tables.

Commented by Atanas Atanassov on April 29, 2009 at 5:00 PM
Tables and Fields numbers also can be obtained by using "Get Table Titles" and "Get Field Titles" commands.