Create a table.
Creation should include following these steps:
- Type the keyword CREATE TABLE [tablename]. Note that the table name cannot be more than 30 characters, start with anything but a letter; the keyword cannot be an SQL keyword and cannot contain any special characters except for the “$” and “_”.
- Choose the column names and the datatype and length necessary for each column (see the syntax example below).
CREATE TABLE employees(
- Add other constraints as demanded by the table instance charts to ensure data integrity. Note that examples of constrains are NOT NULL, PRIMARY KEY, UNIQUE KEY, FOREIGN KEY, and CHECK CONSTRAINT. Constraints may be added in the column definitions (called column-level constraints) or after the columns are defined (called table-level). NOT NULL constraints are a type of check constraint and can only be defined at column level. Constraints are needed in order to ensure data integrity.
Related Standards of Learning
The student will select and implement appropriate data structures, including arrays (one- and/or two-dimensional) and objects.