Gambas Documentation - /comp/gb.db/.table.fields/add

/comp/gb.db/.table.fields/add

# .Table.Fields.Add (gb.db)

Sub Add ( Name As String, Type As Integer [ , Length As Integer, Default As Variant, Collation As String ] )

Add a field into a table being created.

- Name is the name of the field.

- Type is its datatype.

- Length is the maximum length of the field. It is used only for String fields.

- Default is an optional default value. If not specified, the default value is NULL.

The possible field datatypes are:

- db.Integer

- db.Long

- db.Float

- db.Boolean

- db.String

- db.Date

- db.Serial

- db.Blob