How to Add column in existing DB Table
In Process Studio, you can add a new column to an existing database table using-
Method 1. Using the “Execute SQL Script” Step in a Workflow (.psw)
If you want to execute a custom ALTER TABLE statement directly within a data processing workflow:
- Drag the Execute SQL Script step (from the Scripting plugin category) onto your workspace canvas.
- Double-click to open the step configuration.
- Select your database Connection.
- In the SQL script to execute text box, enter your
ALTER TABLEstatement:
ALTER TABLE employees ADD phone_number VARCHAR(20);
- Click OK to save.
- Note: If this step is connected to a data stream, ensure it is configured to execute once during initialization or isolated so it does not run repeatedly for every incoming data row.
Method 2: Using the “SQL” Process Entry in a Process (.psp)
If you are orchestrating high-level control flows inside a Process (.psp) file rather than a row-by-row workflow:
- Drag the SQL process entry (from the Scripting plugin category) onto your process canvas.
- Select your Database Connection.
- In the SQL script area, write your alter statement:
ALTER TABLE employees ADD phone_number VARCHAR(20);
save and execute the process entry as part of your pre-processing setup