Table Editor tab - Columns

On the Columns tab, you can define and manage the structure of a table by configuring its columns:

  • Add, modify, or remove columns.
  • Specify column properties, such as data type, length, default values, constraints (NULL, NOT NULL), and collation.
  • Set primary keys, unique constraints, and identity properties.
  • Define computed columns.

Columns grid

In the grid, you can do the following:

  • Add a column name or rename an existing column.
  • Set a column data type.
  • Define a NOT NULL constraint.
  • Specify an IDENTITY property.
  • Set a column DEFAULT.

Manage column properties

In the Columns grid, select the column and customize its properties in the Column properties grid.

The available properties are grouped into the following categories:

  • Main – Name, Unique, Primary.
  • Data Type – Data Type, Length, Precision, Scale.
  • Identity – Identity, Seed, Increment, Not for Replication.
  • Computed – Computed, Persisted, Expression.
  • Miscellaneous – Not Null, Collation (database default), Default, Description.

Shortcut menu options

Right-click the columns grid and select the required option.

Table Editor - Columns

The table describes the shortcut menu options.

Name Description
New column Adds a new column to the grid. The default name is column1, then column2, etc.
To add a column manually, scroll to the empty row at the end of the list.
Shortcut: Ins
Insert column Inserts a column above the selected column.
Find column Finds a specific column in the Columns grid.
Move Up Moves the selected column one position higher.
Alternatively, drag the column up.
Shortcut: Ctrl+Up
Move Down Moves the selected column one position lower.
Alternatively, drag the column down.
Shortcut: Ctrl+Down
Remove column Removes the selected column.
Shortcut: Ctrl+Del

In the grid, you can also define the NOT NULL, Identity, and Default properties.

Assign data type

dbForge Studio automatically assigns a data type based on the column name. By default, a new column is set to VARCHAR. If you name the column ID or id, the tool automatically changes the data type to INT.

The table lists the heuristics the tool uses to infer data types based on column names:

Group Name Inferred data type
Identifier id, user_id, order_id, product_id, customer_id, supplier_id, employee_id, invoice_id, transaction_id, category_id, department_id, session_id, record_id, log_id, event_id, message_id, token_id, reference_id, doc_id, file_id, image_id, video_id, article_id, note_id, comment_id, tag_id, item_id, row_id, uuid, guid INT
Financial cost, price, amount, amt, total, subtotal, balance, credit, debit, fee, charge, commission, tax, vat, gst, net, gross, margin, discount, rate, salary, wage, income, expense, payment, payout, refund, revenue, profit, loss MONEY
Date date, created_date, modified_date, updated_date, start_date, end_date, due_date, birth_date, hire_date, expiry_date, expiration_date, issue_date, shipment_date, delivery_date, payment_date, invoice_date, order_date, arrival_date, departure_date, release_date, close_date, report_date, transaction_date, activation_date, deactivation_date, anniversary_date, renewal_date, update_dt, event_date, log_date DATE
Time time, start_time, end_time, created_time, modified_time, updated_time, due_time, arrival_time, departure_time, event_time, schedule_time, timestamp, login_time, logout_time, checkin_time, checkout_time, execution_time, elapsed_time, response_time, processing_time, completion_time, runtime, uptime, downtime, access_time, send_time, receive_time, birth_time, death_time, alarm_time DATETIME2
Count qty, quantity, count, total_count, number_of_items, items_count, attempts, clicks, views, hits, likes, shares, followers, following, friends, subscribers, messages, posts, comments, votes, downloads, uploads, instances, occurrences, rows, columns, cells, pages, records, entries, segments INT
Measurement weight, mass, size, length, height, width, depth, thickness, distance, radius, diameter, volume, area, speed, velocity, temperature, pressure, altitude, latitude, longitude, x_coord, y_coord, z_coord, score, rating, grade, percentage, probability, percent, ratio, index DECIMAL(8, 2)
Text name, first_name, last_name, full_name, middle_name, short_name, display_name, username, screen_name, nickname, alias, title, company_name, organization_name, institution_name, description, summary, caption, label, category VARCHAR(100)
Metadata code, status, state, zip, postal, postal_code, zip_code, phone, phone_number, fax, email, email_address, website, link, homepage, path, filename, filepath, mimetype, content_type, currency, unit, department, role VARCHAR(50)
Miscellaneous password, token, hash, signature, checksum, etag, uuid_text, guid_text, session_key, api_key, secret, note, comment, remarks, message, content, blob, data, info, details, metadata, config, settings, preferences, profile, avatar, image_url, thumbnail, icon, picture, photo, documentation, manual, guide, instruction, procedure, policy, rule, regulation, law, version, revision, build, release, environment, platform, device, browser VARCHAR(150)

Search for columns

1. Right-click anywhere in the grid and select Find column.

2. In the search box, enter the search string.

The columns that match the search criteria will be filtered in the grid, and the matching text will be highlighted in yellow.

If you enter text with spaces, each subsequent input will highlight new results.

Delete the text in the search box

To delete the text, in the search box, select Clear.

Remove the search box

To remove the search box from the grid, select Remove next to the search box.

Specify a column name or rename an existing column

In the Name column, double-click the cell and enter a new name.

Set a column data type

1. In the Data Type column, double-click the cell for the column whose data type you want to set or modify.

2. From the list, select the required data type.

Specify NOT NULL

In the Not Null column, select the checkbox for the column you want to be NOT NULL.

Specify an identity

In the Identity column, select the checkbox for the required column.

Set a column default

The default value is applied when you insert a row without specifying a value for the column.

In the Default column, select the cell and enter a default value.

Note

You can set or modify a default value only for supported data types.

Save the changes

An asterisk ( * ) on the table editor tab title indicates that there are unsaved changes.

To save and apply them, on the Table Editor toolbar, click Apply Changes.

Note

Use Ctrl+F to locate column definitions or table settings in the DDL script.