Working with Columns

After creating a table, you can add new columns in that table. You can also perform the following operations on the existing column only for a Regular table:

Creating a New Column

Follow the steps below to add a new column to the existing table:

  1. Right-click Columns and select Create column.

    The Add New Column dialog box is displayed prompting you to add information about the new column.

  2. Enter the details and click Add. You can view the added column in the corresponding table.

    Data Studio displays the status of the operation in the status bar.

Renaming a Column

Follow the steps below to rename a column:

  1. Right-click the selected column and select Rename Column.

    A Rename Column dialog box is displayed prompting you to provide the new name.

  2. Enter the name and click OK. Data Studio displays the status of the operation in the status bar.

Toggle Not Null

Follow the steps below to set or reset the Not Null option:

  1. Right-click the selected column and select Toggle Not Null.

    A Toggle Not Null Property dialog box is displayed prompting you to set or reset the Not Null option.

  2. In the confirmation dialog box, click OK to complete the operation successfully. Data Studio displays the status of the operation in the status bar.

Dropping a Column

Follow the steps below to drop a column:

  1. Right-click the selected column and select Drop Column. This operation deletes the column from the table.

    A Drop Column dialog box is displayed.

  2. Click OK to complete the operation successfully. Data Studio displays the status of the operation in the status bar.

Setting the Default Value of a Column

Follow the steps below to set the default value for a column:

  1. Right-click the selected column and select Set Column Default Value.

    A dialog box with the current default value (if it is set) is displayed, prompting you to provide the default value.

  2. Enter the value and click OK. Data Studio displays the status of the operation in the status bar.

Changing the Data Type

Follow the steps below to change the data type of a column:

  1. Right-click the selected column and select Change Data Type.

    Change Data Type dialog box is displayed.

    Note

    The existing data type will show as Unknown while modifying complex data types.

  2. Select the Data type Schema and Data Type. If the Precision/Size spin box is enabled, enter the required details and click OK. Data Studio displays the status of the operation in the status bar.