Previous Next JavaScript must be enabled to correctly display this content

## 5.4.5 Loading Quick SQL Sample Models

Learn about Quick SQL shorthand syntax by loading Quick SQL sample models.

- About Quick SQL Sample Models
  Learn about available Quick SQL sample models.
- Loading a Quick SQL Sample Model
  Access Quick SQL sample models by selecting the Load action from the Quick SQL Actions menu, or by clicking Help and selecting Samples.

Parent topic: Using Quick SQL

### 5.4.5.1 About Quick SQL Sample Models

Learn about available Quick SQL sample models.

Quick SQL includes the following Quick SQL sample models:

- Departments and Employees - Creates a `DEPARTMENTS` and `EMPLOYEES` tables with an additional `EMP_V` join view. Random data is also generated using `/INSERT` syntax. The `/NN` adds a `NOT NULL SQL` column constraint. Indented lists are used to define tables, columns and child tables. Primary and foreign key columns are automatically added. You do not need to supply any primary or foreign key columns.

- Employee Skills - Creates a `DEPARTMENTS`, `EMPLOYEES`, and `SKILLS` table using indentation to identify parent and child tables. Shorthand syntax `VC255` specifies the SQL datatype. The `/INSERT` syntax is used to generate ten rows of random data and provides example values (`/VALUES`). Defines legal values with a check constraint (`/CHECK`). Illustrates adding a column comment in square brackets.

- Product Sales - Creates a star schema with `PRODUCTS`, `CUSTOMERS`, `CHANNELS`, `PROMOTIONS`, and `SALES` tables. The `SALES` table contains foreign key references to the other tables. A `SQL VIEW` is also created which joins all five tables. Random sample data is also generated. Numeric column are identified with `NUM` syntax.

- Project Management - Defines project management schema with a `PROJECTS` parent table and four child tables: `MILESTONES`, `LINKS`, `ATTACHMENTS`, and `ACTION_ITEMS`. Adds the view `PROJECT_MS` joining `PROJECTS` and `MILESTONES` and `PROJECT_AI` combining `PROJECTS` and `ACTION_ITEMS`. Specifies legal values (`/CHECK`), example values (`/VALUES`), and generates sample rows (`/INSERT`). Adds audit columns in SQL syntax directives after`#-sign (auditcols: true)`.

- ToDos - Creates `ASSIGNEES` and `TODOS` tables. Defines NOT NULL constraints (`/NN`). Specifies legal values (`/CHECK`). Generates sample data (`/INSER`T). Adds audit columns (`#auditcols: true`). This sample is designed as a starting point to enable the creation of a customized ToDo system within minutes.

Parent topic: Loading Quick SQL Sample Models

### 5.4.5.2 Loading a Quick SQL Sample Model

Access Quick SQL sample models by selecting the Load action from the Quick SQL Actions menu, or by clicking Help and selecting Samples.

To load the Quick SQL samples:

1. Navigate to the Quick SQL page:
   1. On the Workspace home page, click the SQL Workshop icon.
   2. Click Utilities.
   3. Click Quick SQL.

   The Quick SQL page appears. You can load Quick SQL samples in two ways:

   - From Help.
   - From the Quick SQL Actions menu.
2. To load samples from Help:
   1. In the left pane, click Help and then select the Samples tab.
   2. Choose a sample and click Load Model.
3. To load samples from the Quick SQL Actions menu:
   1. In the left pane, click the Quick SQL Actions menu (three vertical dots) and select Load.
      The Load dialog appears with the Samples tab selected.
   2. Choose a sample and click Load Model.

The sample loads. Quick SQL shorthand syntax displays in the left pane and the corresponding generated SQL displays in the right pane.

Parent topic: Loading Quick SQL Sample Models