##### Define > Database Interfaces > Database Interface Properties

# Add Column

The Add Column task is different depending on the selected Query Type.

## Add Column for Select or Stored Procedure

To select this option, the user must first add a table to the query. Select a table in the tree view from the Database Interface Properties dialog box and then click Add Column. Clicking Add Column when a Select or Stored Procedure query type is selected opens the Column Properties dialog box.

### Table

This field refers to the currently selected table in the Database Interface Properties dialog box.

### Column

This field contains a drop-down list of the columns contained in the selected table. You must select a column before continuing. Column names cannot contain spaces. Column names with spaces will not appear in the drop-down list.

### Alias

This field allows you to assign an alias for the data in the selected column.

### Grouping

This option allows you to group items in a SQL query in order to perform counts or sums.

## Add Column for Update

To select this option, you must first add a table to the query. Select a table in the tree view from the Database Interface Properties dialog box and then click Add Column. Clicking Add Column when an Update query type is selected opens the Column Properties dialog box.

### Table

This field refers to the currently selected table in the Database Interface Properties dialog box.

### Column

The field contains a drop-down list of the columns contained in the selected table. You must select a column before continuing. Column names can not contain spaces. Column names with spaces will not appear in the drop-down list.

### Value Type

For this field, valid value types are field or value. If you select Field from the drop-down list, the value for this column is from a field. If Value is selected, the value is a static value.

### Field

Depending on value type, this will either be a drop down list of existing Genesys Agent Scripting fields or a static value that you can enter.

### Show All Fields

This button only appears for Update from table queries. For queries of this type, you select a Genesys Agent Scripting table to map to back to the database to be updated. When you then add a column to the query, the list of columns only contains those choices that are in the Genesys Agent Scripting table. The show all fields button will change the drop-down list so that it contains all Genesys Agent Scripting fields rather than just those contained in the selected table.