2. Create Database
Description
The "Create Database" function is a fundamental tool for managing databases. It allows you to create a new SQLite database and define a table within it with the specified columns. This function simplifies the process of database creation and table setup, enabling effective organization and storage of your data.
Usage
- Open the terminal and type:
tt --db createdb [ARGS]
# or
tt -dbm createdb [ARGS]
Arguments
- --DIRPATH (Required)
Example:
tt --db createdb --DIRPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db
- *--TABLENAME (Required)
Example:
tt --db createdb --TABLENAME MyTable --DIRPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db
- --COLUMNS (Required)
Example:
tt --db createdb --COLUMNS 'id(INTEGER PRIMARY_KEY), name(TEXT), age(INTEGER)' --DIRPATH C:\\Users\\MyUser\\ProjectName\\sqlite.db --TABLENAME MyTable
(Please make sure there are single quotes (') or double-quotes (") around the column args.)