Defining Columns - ER Diagram Syntax

  • Each table field must be defined on a separate line in the following format: "FieldName datatype". 
  • Followed by column constraints (such as data type, PK, FK, UNIQUE, INDEX, IDENTITY, DEFAULT, NOT NULL, NOTE) may follow in any order.
  • If the field name has spaces, enclose within double quotes. eg. "Customer Name"
CustomerID int PK
Name varchar(100)
Address1 string
Address2 string
City string