---
title: Make, empty and drop tables
project: TotalSQL
version: Latest
section: guides
language: en
license: 
url: https://totaljs.es/docs/totalsql/latest/guides/tables/
updated: 2026-12-02T15:40:26.075Z
---

# Make, empty and drop tables

> Make a table by filling in its columns, or take one away. In both cases you read the SQL before it runs.

## Make a table

1. Press **New table…**, the plus next to **Find a table**.
2. Write its name. If the database has several schemas, choose one.
3. Fill in the columns. There are two to begin with: a key called `id`, which the database numbers, and an empty one for text.
4. Press **Column** for each one more. Those without a name are left out.
5. Press **Review**, read the statement, and press **Make the table**. **Back** returns to the columns.

| Column of the form | What it means |
| --- | --- |
| **Type** | Choose one of the common types, or write any that your database has |
| **Default** | An expression: `0`, `'new'`, `now()` |
| **NULL** | It may have no value |
| **Key** | Part of the primary key. Mark several for a key of several columns |
| **Numbered** | The database gives the numbers: 1, 2, 3… Only for a key |

Then add its [indexes, relations and rules](/totalsql/latest/guides/structure/). In SQLite, relations and rules are set when the table is made, so write its `CREATE TABLE` in [a query](/totalsql/latest/guides/queries/) if you need them.

## Rename a table

In **Structure**, press **Rename the table…** Views, functions and programs that name the table are not changed with it.

## Start a query on a table

With the right button, **New query on it** opens a query that takes the first 100 rows of the table, in the words of your database and with the name between its quotes.

**Copy the name** copies the name of the table, with its schema.

## Empty a table

Choose **Empty…** with the right button. Every row goes and the table stays. If other tables point to this one, the database may refuse.

## Drop a table or a view

Choose **Drop…** with the right button. A table goes with every row that it has.

> Emptying and dropping cannot be undone. [Export the table](/totalsql/latest/guides/export/) first if you may need it.

On a read-only connection you cannot make, rename, empty or drop anything here.

## After a change made elsewhere

If another program made or dropped a table, press **Reload the tables**.
