Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Albert Rognan: "Thank you for this quick reply. I must say I am impressed of the number of functions that is available within this tool".
Alex Torin: "Several months ago I downloaded the trial versions of several Microsoft SQL administration tools that I was able to find using google. I had considerable trouble with most of them crashing... but using your product I was able to isolate and solve the problems I was having. I decided to add it to my toolkit and have recommended it to a few others".

More

Add your opinion

MS SQL Maestro online Help

Prev Return to chapter overview Next

Fields

Table columns are created and edited within the Field Editor.

 

 

To add a new table column, you should either:

 

open the table in Table Editor and the Fields tab there;
press the Insert key or select the Add New Field... item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

or

select the table in the explorer tree and use the Create New Field popup menu item

or

select the table Fields node or any field within the table in the explorer tree and use the Add New Field... popup menu item.

 

 

 

Table fields are edited within the Field Editor dialog window. In order to open the dialog you should either

 

open the table in Table Editor and the Fields tab there;
press the Enter key or select the Edit Field item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

or

select the field to edit in the explorer tree and use the Edit Field popup menu item.

       

You can change the name of the field using the Rename Field dialog. To open the dialog you should either

 

select the field to rename in the explorer tree;
select the Rename Field item from the popup menu

or

open the table in Table Editor and the Fields tab there;
select the field to rename;
select the Rename Field item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar).

 

 

 

To drop the table field:

 

select the field to drop in the explorer tree;
select the Drop Field item from the popup menu

or

open the table in Table Editor and the Fields tab there;
press the Delete key or select the Drop Field item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar)

 

and confirm dropping in the dialog window.

 

 

 

To specify the Data Type, select it from the drop-down list.

 

Note: the name of the object must be unique among all the object names in the table. You can use any identifier that is allowed by Microsoft SQL server.

 

XML schema collection

Used only in case xml is selected as Type. Applies only to the XML data type for associating an XML schema collection with the type. Before using you are to create the schema in the database first.
 

See also: XML schema collection
 

Content|Document

Denotes that each instance of the xml data type can contain multiple top-level elements (for Content) or only one top-level element (for Document).

 

Parameters

Use the Size edit box to define the length of the field value for integer, float, char and other data types and use Precision to define the precision of the field value, e.g. for float data type.

 

The max value applies only to the varchar, nvarchar, and varbinary data types for storing 2^31 bytes of character and binary data, and 2^30 bytes of Unicode data.

 

Field flags

 

Not Null

Forbids the NULL values for the field.

 

Unique

Includes the field into the unique key (index).

 

Primary Key

With this option checked the field becomes the only field with a primary key. If you check this field, you will not be able to set this attribute for any other field in the table. Hence if you want to create a compound primary key, do not check this field but create a primary key through the Indexes tab of Table Editor or the appropriate step of Create Table Wizard.

 

Row Guid

Indicates that the new column is a row GUID column.

 

Formula

Represents an expression that defines the value of a computed column. A computed column is a virtual column that is not physically stored in the table unless the column is checked Persisted.

 

Rule

Binds the rule to a column data type. The rule is to be created in the database beforehand.

 

See also: Rules

 

Default value

Within the box you can assign a default value for the field column. The action is optional. If the default value was specified during the new row created and no values is specified for some of the columns, the columns will be filled with their respective default values.

 

The Comment box allows you to set optional text describing the field.

 

Check the Identity option to indicate that the new column is an identity column.

 

Seed

Defines the value used for the very first row loaded into the table.

 

Increment

Defines the incremental value added to the identity value of the previous row loaded.

 

Not For Replication

If checked, values are not incremented in identity columns when replication agents perform inserts.

 



Prev Return to chapter overview Next