Written by

Developer, analyst, qa, moderator at TECCOD
Question Dmitrij Vladimirov · May 8

How to delete table column with its data with SQL command. I need the exact syntax of the command

I have a table in the development and want to erase data from certain columns. There is info in the docs but not for human
This piece of code does not work

ALTER TABLE table DROP COLUMN column %DELDATA
Product version: IRIS 2024.3

Comments

Dmitrij Vladimirov  May 9 to Luis Angel Pérez Ramos

Thanks for the reply.
CASCADE means that the data is deleted also in parent and child tables, RESTRICT means that only parent data is deleted. Changing the default RESTRICT does nothing, the data is still there
Any other option?

UPD: i've managed to delete data with

UPDATE TABLE table SET column = NULL

But issue is still open, why %DELDATA do nothing

0
David Van De Griek  May 12 to Dmitrij Vladimirov

This is technically a defect that we should correct. 

Note that for some storage models the data is deleted.  For example, if the column uses Columnar Storage instead of Row Storage, the data is deleted.  

0