Column Types Back | Forward | Home

'Language Reference'
  • Logical Operators

  • Relational Operators

  • Data Types

  • Column Types

  • Primary Keys

  • Functions

  • Where Clauses

  • LIKE Clauses

  • Limit Clauses

  • OrderBy Clauses

  • Notes


  • User Functions

    Database Functions

    Data Manipulation Functions

    Table Functions

    Error Handling Functions

    << Last Section ( Data Types ) Column Types Next Section ( Primary Keys ) >>

    When creating a table, there are multiple column types that you can choose from to customize that column. They can be any one of the following or more.

    Name Example Description
    auto_increment array('auto_increment' => [0|1]) This columns increments itself automatically when inserting. This column must be of type 'int'.
    max array('max' => $maxLength) This column type limits the length of the field to $maxLength. If the column is of type integer, then the value will be checked against rather than the length
    permanent array('permanent' => [0|1]) This column type, when set to 1, does not allow it to be editable until set to 1 again
    type array('type' => [string|text|int|bool|date|enum]) see the data types section
    enum_val array('enum_val' => array([$values]...)) This column type is only required when the column's type is set to enum. This is the list of possible values in the column. The default value is always the trailing value. If the value doesn't match any one of the enum_val's, then it will be replaced with the default value.
    default array('default' => $defaultValue) This type allows txtSQL to know what the default value for a column is. txtSQL will use this value only when there is no value for a column given to insert
    primary array('primary' => [0|1]) Tells txtSQL that this column is the primary column, when set to 1. There can only be one per table, and it must be of type 'int' and has to be 'auto_increment'


    User-Contributed Comments for:
    Column Types
    No comments found;