# Rename NocoDB M2M table \[Mar 11\]

**URL:** <https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308 "2022-11-03T08:24:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/1 "2022-11-03T08:24:21Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _asked_

## Hi friends! Newbie here, super excited about what you all have built. I think it’s going to be a game changer for me, my colleagues, and other grassroots organizers who need easily accessible tools like this in their stacks.

#### 

#### I have a couple of questions about how nocodb handles linking tables for many to many relationships. tl;dr: a.) Can one a user give meaningful names to linking tables created through nocodb, or, b.) can a user use nocodb to interpolate linking tables, and use those many to many relationships (in table views, etc.)? I tried to write up a detailed problem description with screenshots here. [NocoDB - Relationships and Databases - Google Docs](https://docs.google.com/document/d/1KpgzmbfoKe8VXuFLJM4JJ0Ny740RVkbkOtYbFLVM9Ug/edit)

#### 

#### I’m relatively new to the open source community (and the software dev community in general), so if this should be an issue on github, or a tweet, or an email, or not asked here, or not asked at all, plz dont hate me! I’ll delete and repost somewhere more appropriate 🙂

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/2 "2022-11-03T08:24:22Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### You can rename m2m tables.

#### - Open project

#### - Click on user icon \> Themes

#### - Enable “Show M2M Tables”

#### - Hard refresh, (cmd+shift+r on mac) if additional tables are not displayed by default on project tree

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/3 "2022-11-03T08:24:23Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### 

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/f331cea6bc431c3155b468e569267008e4682cc9.png)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/4 "2022-11-03T08:24:24Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### You can then rename table or column name like any other table.

#### 

#### This will only change table/ column name alias for display on NocoDB UI. Right now, we do not have a mechanism to choose custom names in backend tables.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/5 "2022-11-03T08:24:25Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### Q2: Is there any way that I can tell NocoDB about this relationship, and it can understand it and treat it the same way as if I’d made the tables through Nocodb? Alternatively, am I simply missing something, and I can make use of this functionality as-is? For example, how could I set up a sheet (view?) where a user could add and remove territories to an employee?

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/6 "2022-11-03T08:24:26Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### NocoDB infers relationship if you are connecting to external DBs. Additional relations can be created as you wish.

#### 

#### You can refer to following documentation section to create new links to existing tables

#### [https://docs.nocodb.com/setup-and-usages/link-to-another-record](https://docs.nocodb.com/setup-and-usages/link-to-another-record)

#### 

#### Subsequently, you can lookup/rollup to make more meaningful references to foreign tables

#### [https://docs.nocodb.com/setup-and-usages/lookup](https://docs.nocodb.com/setup-and-usages/lookup)

#### [https://docs.nocodb.com/setup-and-usages/rollup](https://docs.nocodb.com/setup-and-usages/rollup)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/7 "2022-11-03T08:24:28Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### Q3: Suppose I have a relationship between two tables, as described in part 1.c. Can I edit the parameters of those relationships? Do I have to delete the relationship (and the ensuing data) and start again from scratch if I want to change the parameters, like the on delete behaviour?

#### 

#### You can reconfigure such relations from the backend utility like TablePlus or PGAdmin & then sync NocoDB

#### [https://docs.nocodb.com/setup-and-usages/sync-schema](https://docs.nocodb.com/setup-and-usages/sync-schema)

#### 

#### Such changes will be accounted as relation delete & create by NocoDB.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/8 "2022-11-03T08:24:29Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Thanks so much for the quick and informative responses! Really appreciate it. Re Q1 and Q3, I think that explains it well.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/9 "2022-11-03T08:24:30Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Re Q2, I’m still not understanding exactly. In my database (northwind), I have an m2m table called employee\_territories with FK relationships to employees and territories.

#### 

#### It’s not clear to me how I can add a column to Employees showing the name of the territories they are associated with. Lookup dosn’t work, and LinkToAnotherRecord seems like it would create a new relationship on top of the existing one. When I try creating a new record link, if I try “has many” it tells me “relation update successful” and creates a new relation table in the db, in addition to the employee\_territories one that already exists. But even with this, nothing changes in the UI and there’s no way to get the column with data I need. Am I missing something?

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/56db672bafa5ca6bdf04f25f5cb27ec5b5572862.png)  
 ![image1](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/df202fce2a86109d5d6baf61ce57b30eabaede5c.png)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/10 "2022-11-03T08:24:31Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Happy to share a reproduceable example if it’s helpful!

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/11 "2022-11-03T08:24:32Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Oh, and while we are on the topic (if you don’t mind), I had one more question, related to all of this. (Q4). Can relations only show Primary Keys?

#### 

#### Imagine if, in the case I asked about in Q1, we add another column in Territories, Abbreviation.

#### 

#### Would it ever be possible to select which field from Territories I’m going to show in the Users table in my linked field? Could I have different columns in the user tables show different fields from Territories? Happy to elaborate more if it’s helpful.

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/04515b368ea914983bef101f8039a8c698ab1a1e.png)  
 ![image1](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/42ec22ccdf035d717bc31674f6a9f6f2d966dc45.png)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/12 "2022-11-03T08:24:33Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### Q2: Adding a record, please see if the workflow captured here helps

#### [Workflow with Launchnotes and localhost](https://app.tango.us/app/workflow/Workflow-with-Launchnotes-and-localhost-5e00f787c3b14180be86e9d437d1d24b)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/13 "2022-11-03T08:24:34Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Thanks dstala@discord ! I really appreciate it. I think maybe my question wasn’t exactly clear. I was wondering how/if I can switch between displaying the Territory Name, versus the Territory Abbreviation, in the Users table.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/14 "2022-11-03T08:24:35Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### To use a different field, you will have to set it as ‘Primary value’

#### Click on drop down menu for the column you wish to reconfigure, and select it as ‘Primary Value’

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/6823a187201ed98326cdf57f1de8aa58d9a4a5cf.png)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/15 "2022-11-03T08:24:37Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### ^got it. Okay! So it can only show the primary value.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/16 "2022-11-03T08:24:38Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### after configuring abbreviation as primary value

 ![image0](https://canada1.discourse-cdn.com/flex011/uploads/nocodb/original/1X/c03515609fdcd8e3966dda152654128959f86993.png)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/17 "2022-11-03T08:24:39Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Perf. Is it on the roadmap / horizon / is it a feature I can request (and eventually possibly help with) to enable a select of a different (non PK) column from a linked table? (And if we went down that road, maybe be able to add some more complex criteria like WHERE clauses, etc.)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/18 "2022-11-03T08:24:40Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### Primary value can be any field. Not just PK.

#### 

#### \> (And if we went down that road, maybe be able to add some more complex criteria like WHERE clauses, etc.)

#### 

#### You can go ahead & request for a feature [here](https://github.com/nocodb/nocodb/issues/new?assignees=&labels=&template=feature_request.md&title=%5BFeature%5D+). Do let us know use case that you are considering for the associated feature request.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/19 "2022-11-03T08:24:41Z")

</div>

> 🙋‍♂️ **Mara Rafferty** _replied_

#### Got it got it! Thanks. Will do 🙂

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 8:24am UTC](https://community.nocodb.com/t/rename-nocodb-m2m-table-mar-11/308/20 "2022-11-03T08:24:42Z")

</div>

[Autogenerated from discord](https://discord.com/channels/661905455894888490/950905857472880650)

* * *

#### Join [NocoDB’s](http://www.nocodb.com/) community

[Discord](https://discord.gg/5RgZmkW) • [Twitter](https://twitter.com/nocodb) • [Reddit](https://www.reddit.com/r/NocoDB/) • [Docs](https://docs.nocodb.com/)
