Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:create_a_simple_database_schema [2018/05/12 16:08] billdozor [Create a Database] |
linux_wiki:create_a_simple_database_schema [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 73: | Line 73: | ||
Create a new table in the emails database | Create a new table in the emails database | ||
<code bash> | <code bash> | ||
- | MariaDB [emails]> | + | MariaDB [emails]> |
</ | </ | ||
* When you create a table, you must define the names of the columns and the type of data they should contain | * When you create a table, you must define the names of the columns and the type of data they should contain | ||
Line 79: | Line 79: | ||
* userID INT -> Named userID and of type integer | * userID INT -> Named userID and of type integer | ||
* AUTO_INCREMENT -> Auto increment the entries in this column | * AUTO_INCREMENT -> Auto increment the entries in this column | ||
+ | * PRIMARY KEY -> The userid column is the primary sorting key | ||
* userFirstName char(25) -> Named userFirstName and of type characters up to 25 long | * userFirstName char(25) -> Named userFirstName and of type characters up to 25 long | ||
- | * PRIMARY KEY (userid) -> The userid column is the primary sorting key | ||
* Table Options | * Table Options | ||
* AUTO_INCREMENT = 100 -> Start userid at 100 | * AUTO_INCREMENT = 100 -> Start userid at 100 |