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 %DELDATAComments
Try modifying the default action RESTRICT for CASCADE like this:
ALTERTABLEtableDROPCOLUMNcolumnCASCADE %DELDATAhttps://docs.intersystems.com/iris20251/csp/docbook/DocBook.UI.Page.cls…
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 = NULLBut issue is still open, why %DELDATA do nothing
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.