SQL EXECUTE SCRIPT (How to add 4D Object field to 4D table using ALTER TABLE?)

How do we add an 4D Object field to a 4D table using SQL’s ALTER TABLE in v17R5 release?

The 4D implementation of SQL https://doc.4d.com/4Dv17R5/4D/17-R5/4D-SQL-engine-implementation.300-4142703.en.html#4164786says> there is an Object type column.

But I get an error with this SQL statement using SQL EXECUTE SCRIPT:
ALTER TABLE test ADD somename Object;
A runtime error appears. The field “anobject” is not added. (But all other fields preceding the above SQL script line are added.)

Here’s the error:

If Object is replaced by Varchar in the SQL statement, then “anobject” is added as a text field to the 4D table “test”.
ALTER TABLE test ADD anobject Varchar;


How do we use an SQL script (with ALTER TABLE) to add an “Object” field to a 4D table?

Pretty sure object support in SQL is read only.


Yes, the Object type you see in the documentation


has been added to READ an object field with SQL --> https://blog.4d.com/read-4d-object-fields-with-sql-engine/