Search code examples
multiple-columnsrenamenetezzaalter

Rename two columns in netezza using single query


I am new to netezza. I need to know how can we rename two columns with a single query.

I've tried ,

ALTER TABLE tabemp RENAME COLUMN salary to empsalary and name to empname;

ALTER TABLE tabemp RENAME COLUMN salary to empsalary , name to empname;

But none of these is working.

Thanks.


Solution

  • With a query, only one column can be renamed at a time. You can write a wrapper script to rename multiple columns or use IBM Netezza Performance portal to edit the table. Check the link here!