Delete all values in a column

Hi All,

I want to remove all the values in a column of a database entity,

Can anyone give me the query.

I don't want to drop the column, i want to just remove values.


Thanks in advance :)

Dhiraj M

Solution

Hi,


You can do it in an SQL node (since it's a bulk operation, for performance questions, it's better) and is something like this:

UPDATE {Table Name} SET {Table Name}.[Column Name] = Null;

You need to understand the type of data in that column and adapt the "null".

You can use a dummy structure as output just to avoid the error.


Hope this can help.


Best regards,

Ricardo M Pereira

Solution

Ricardo Pereira wrote:

Hi,


You can do it in an SQL node (since it's a bulk operation, for performance questions, it's better) and is something like this:

UPDATE {Table Name} SET {Table Name}.[Column Name] = Null;

You need to understand the type of data in that column and adapt the "null".

You can use a dummy structure as output just to avoid the error.


Hope this can help.


Best regards,

Ricardo M Pereira

Thanks Ricardo, it worked :)


Hi,


Glad to know. :)


Best regards,

Ricardo M Pereira