Skip to content

4. Create Table

Description

Creates a new table in an existing database with the specified columns.

Usage

  1. Open the terminal and type:
tt --db createtable [ARGS]
# or
tt -dbm createtable [ARGS]

Arguments

  • --DBPATH (Required)

Example:

tt --db createtable --DBPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db
  • --TABLENAME (Required)

Example:

tt --db createtable --TABLENAME MyTable --DBPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db
  • --COLUMNS (Required)

Example:

tt --db createtable --COLUMNS 'id(INTEGER PRIMARY_KEY), name(TEXT), age(INTEGER)' --DBPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db --TABLENAME MyTable

(Please make sure there are single quotes (') or double-quotes (") around the column args.)