mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
205 lines
8.9 KiB
205 lines
8.9 KiB
1 year ago
|
---
|
||
|
title: "Table Operations"
|
||
|
description: "Table Operations: Row, Column, Quick Import, Export & Import"
|
||
|
---
|
||
|
|
||
|
Once you have created a new NocoDB project you can open it, In the browser, the URL would be like `example.com/#/default/<project_id>`.
|
||
|
|
||
|
## Table
|
||
|
|
||
|
### Table Create
|
||
|
|
||
|
On project dashboard, click on `Add new table` button
|
||
|
|
||
|
![table-create-button](https://github.com/nocodb/nocodb/assets/86527202/0b1d0b89-b3c6-4c3c-8208-4b6afce67d23)
|
||
|
|
||
|
Provide a name for the table & click `Create Table` button.
|
||
|
|
||
|
![table-create-modal](https://github.com/nocodb/nocodb/assets/86527202/fceb6c48-e0d6-428c-bb16-d2da4e38a81f)
|
||
|
|
||
|
After the successful submission, the table will be created and open on a new grid.
|
||
|
|
||
|
![new-table-landing-page](https://github.com/nocodb/nocodb/assets/86527202/96ffae6f-c18f-4b80-81eb-847cfb8116e2)
|
||
|
|
||
|
New table can also be created by using `+` button on project tile in left sidebar
|
||
|
|
||
|
![new-table-on-hover](https://github.com/nocodb/nocodb/assets/86527202/5a4ce91b-f4bf-451c-8835-8e7144deec26)
|
||
|
|
||
|
|
||
|
### Table Rename
|
||
|
|
||
|
Right click on Table name on left sidebar, (OR)
|
||
|
Click on `...` to open `Table context menu`, select `Rename`.
|
||
|
Feed in the changes to the table name & press `Enter`
|
||
|
|
||
|
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
|
||
|
|
||
|
### Table Duplicate
|
||
|
|
||
|
Right click on Table name on left sidebar, (OR)
|
||
|
Click on `...` to open `Table context menu`, select `Duplicate`
|
||
|
|
||
|
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
|
||
|
|
||
|
Additionally, you can configure to duplicate
|
||
|
- `Include Data` : toggle this to include/exclude table records
|
||
|
- `Include Views` : toggle this to include/exclude table views
|
||
|
|
||
|
![table-duplicate-modal](https://github.com/nocodb/nocodb/assets/86527202/e668c382-530f-423c-9de7-f68896a6ba67)
|
||
|
|
||
|
### Table Delete
|
||
|
|
||
|
Right click on Table name on left sidebar, (OR)
|
||
|
Click on `...` to open `Table context menu`, select `Delete`
|
||
|
|
||
|
![table-context-menu](https://github.com/nocodb/nocodb/assets/86527202/67cb7563-5a10-4d91-bc83-b31ff185d18d)
|
||
|
|
||
|
Click on `Delete Table` to confirm
|
||
|
|
||
|
![table-delete-confirmation-modal](https://github.com/nocodb/nocodb/assets/86527202/a0d11ca6-0aed-4eaf-a855-c49ff987d546)
|
||
|
|
||
|
## Column
|
||
|
|
||
|
### Column Add
|
||
|
|
||
|
Click on `+` button to the right of Columns header, type `Column name`
|
||
|
|
||
|
![column-add](https://github.com/nocodb/nocodb/assets/86527202/d3350116-5047-4385-8eab-1fef4b3836ac)
|
||
|
|
||
|
Select a `type` for the column from the dropdown. Depending on the column type, you might find additional options to configure.
|
||
|
Click on `Save column` to finish creating column.
|
||
|
|
||
|
![column-add-type](https://github.com/nocodb/nocodb/assets/86527202/239bfbde-fd20-4f8e-966c-2c60507c195e)
|
||
|
|
||
|
#### Column create before OR after a specific column
|
||
|
You can also use context menu of an existing column to either insert before or after a specific column.
|
||
|
![column-context-menu - insert after before](https://github.com/nocodb/nocodb/assets/86527202/d15b62b4-5302-4c75-bd5b-e60ae8b81a65)
|
||
|
|
||
|
|
||
|
### Column Edit
|
||
|
|
||
|
Double click on Column name in column header to open `Column edit` modal
|
||
|
You can rename column & optionally change column-type.
|
||
|
|
||
|
![column-rename](https://github.com/nocodb/nocodb/assets/86527202/1a0f798e-6726-4810-9645-e531a88e495a)
|
||
|
|
||
|
Note:
|
||
|
- Changing column type might not be allowed in some scenarios & in some other, might lead to either loss or truncated data.
|
||
|
- Column name is also possible using Column context menu as described below
|
||
|
|
||
|
|
||
|
### Column Duplicate
|
||
|
|
||
|
Open `Column context menu` (click `v` on column header), select `Duplicate`
|
||
|
|
||
|
![column-duplicate](https://github.com/nocodb/nocodb/assets/86527202/8d1f36e6-5f6b-4f89-81d0-c0d3148bd056)
|
||
|
|
||
|
Note: Column duplicate only creates another column of same type & inserts it to the immediate right. Currently data in the column is not duplicated.
|
||
|
|
||
|
|
||
|
### Column Delete
|
||
|
|
||
|
Open `Column context menu` (click `v` on column header), select `Delete`
|
||
|
|
||
|
![column-delete](https://github.com/nocodb/nocodb/assets/86527202/2444124d-f12a-4bab-91ce-9b8c0625a263)
|
||
|
|
||
|
Click on `Delete Column` to confirm
|
||
|
|
||
|
![Column delete confirmation modal](https://github.com/nocodb/nocodb/assets/86527202/5675b2ef-9d2c-40fe-900b-d5dd58d1655d)
|
||
|
|
||
|
## Row
|
||
|
|
||
|
For adding new values to the table we need new rows, new rows can be added in two methods.
|
||
|
|
||
|
### Row Add (Using Form)
|
||
|
Click on `New Record` at the bottom of the grid (footbar), select `New Record - Form`
|
||
|
![new record-form](https://github.com/nocodb/nocodb/assets/86527202/c6e9acff-4d54-440a-9888-e24529747cf9)
|
||
|
|
||
|
Populate columns in the Expnaded form popup; click `Save`
|
||
|
![expanded record form](https://github.com/nocodb/nocodb/assets/86527202/ec264f05-8b0b-4029-adc0-a88932d69c9f)
|
||
|
|
||
|
### Row Add (Using Table Row at bottom of page)
|
||
|
![in grid insert](https://github.com/nocodb/nocodb/assets/86527202/cf0b6ccb-f598-4874-bb87-8fe291bab14e)
|
||
|
|
||
|
Click on any of the following options to insert a new record on the grid directly.
|
||
|
- `+`
|
||
|
- `New Record` : `New Record- Grid`
|
||
|
- Right click on any cell, click `Insert new row` from the cell context menu
|
||
|
|
||
|
Note that, any record inserted in the grid will always be appended to the end of the table by default.
|
||
|
|
||
|
### Row Add (Pressing Enter Key from Previous Row)
|
||
|
|
||
|
When you finish editing a cell and press Enter, the cell in the next row with the same column will be highlighted.
|
||
|
|
||
|
![image](https://user-images.githubusercontent.com/35857179/203271676-bab64ca4-e0e4-4deb-9a62-609a97158911.png)
|
||
|
|
||
|
### Row Edit
|
||
|
|
||
|
You can start editing by any of the following methods
|
||
|
- Double-click on cell to edit
|
||
|
- Click on cell and start typing (this way it will clear the previous content)
|
||
|
- Click on cell and press enter to start editing
|
||
|
- And it will automatically save on blur event or if inactive.
|
||
|
|
||
|
### Row Delete
|
||
|
|
||
|
Right-click on the row and then from the context menu select `Delete Row` option.
|
||
|
![delete row -1](https://github.com/nocodb/nocodb/assets/86527202/9eef834b-21cf-4828-90ec-3c2e86cd19db)
|
||
|
|
||
|
Bulk delete is also possible by selecting multiple rows by using the checkbox in first column and then `Delete Selected Rows` options from the right click context menu.
|
||
|
![delete row 2](https://github.com/nocodb/nocodb/assets/86527202/f83c702a-fa75-42a5-86eb-22ed85c0dec1)
|
||
|
|
||
|
## Quick Import
|
||
|
|
||
|
You can use Quick Import when you have data from external sources such as Airtable, CSV file or Microsoft Excel to an existing project by either
|
||
|
|
||
|
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `Airtable` or `CSV file` or `Microsoft Excel` or `JSON file`
|
||
|
- Drag and drop CSV, JSON or Excel file to import
|
||
|
|
||
|
![image](/img/content/quick-import.png)
|
||
|
|
||
|
### Import Airtable into an Existing Project
|
||
|
|
||
|
- See [here](/setup-and-usages/import-airtable-to-sql-database-within-a-minute-for-free)
|
||
|
|
||
|
### Import CSV data into an Existing Project
|
||
|
|
||
|
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `CSV file`
|
||
|
- Drag & drop or select files (at most 5 files) to upload or specify CSV file URL, and Click Import
|
||
|
- **Auto-Select Field Types**: If it is checked, column types will be detected. Otherwise, it will default to `SingleLineText`.
|
||
|
- **Use First Row as Headers**: If it is checked, the first row will be treated as header row.
|
||
|
- **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created.
|
||
|
![image](/img/content/import-csv.png)
|
||
|
- You can revise the table name by double-clicking it, column name and column type. By default, the first column will be chosen as `Display Value` and cannot be deleted.
|
||
|
![image](/img/content/import-csv-2.png)
|
||
|
- Click `Import` to start importing process. The table will be created and the data will be imported.
|
||
|
![image](/img/content/import-csv-3.png)
|
||
|
|
||
|
### Import Excel data into an Existing Project
|
||
|
|
||
|
|
||
|
- Hover on `Project title` in tree-view, click `...` > `Quick Import From` > `Excel file`
|
||
|
- Drag & drop or select files (at most 5 files) to upload or specify CSV file URL, and Click Import
|
||
|
- **Auto-Select Field Types**: If it is checked, column types will be detected. Otherwise, it will default to `SingleLineText`.
|
||
|
- **Use First Row as Headers**: If it is checked, the first row will be treated as header row.
|
||
|
- **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created.
|
||
|
![image](/img/content/import-xls.png)
|
||
|
- You can revise the table name by double-clicking it, column name and column type. By default, the first column will be chosen as `Display Value` and cannot be deleted.
|
||
|
![image](/img/content/import-xls-2.png)
|
||
|
- Click `Import` to start importing process. The table will be created and the data will be imported.
|
||
|
![image](/img/content/import-xls-3.png)
|
||
|
|
||
|
## Export Data
|
||
|
|
||
|
You can export your data from a table as a CSV file by clicking the `...` menu in toolbar, and hover on `Download`. Currently only CSV and XLSX formats are supported for export.
|
||
|
|
||
|
![image](/img/content/export.png)
|
||
|
|
||
|
## Import Data
|
||
|
|
||
|
You can export your data from a table as a CSV file by clicking the `...` menu in toolbar, and hover on `Upload`. Currently only CSV and XLSX formats are supported for import.
|
||
|
|
||
|
![image](/img/content/import.png)
|
||
|
|