Syntax Element: type

Description

Identifies a specific type, including precision, scale, length, and nullness.

Example

This keyword is highlighted like this.
You can click on keywords and concepts in blue.
handdatabase SomeDatabase
{
  types 
    int as integer,
    number ("numeric") as real,
    nstring ("nvarchar") as string;
    
  version 1.0 : initialized
  {
    design
    {
      public table T
      {
        // integer not null
        public column C1 with DataType = type(int);
        
        // integer null
        public column C2 with DataType = type(int null);
        
        // nvarchar(20) not null
        public column C3 with DataType = type(nstring(20));
        
        //nvarchar(100) null
        public column C4 with DataType = type(nstring(100) null);
        
        // numeric(10, 3) not null
        public column C5 with DataType = type(number(10, 3));
        
        // numeric(12, 4)
        public column C6 with DataType = type(number(12, 4) null);
      }
    }
  }
}

Notes

Related Use Cases

Other Actions

documentation | all examples for this syntax element | all examples | use cases | concepts | keywords