How to assign the Primary Key status to an existing field

Hi all
I am curently testing Base and I can’t find out how to do that.
As a rule of thumb, in the table Artists for example, I name the primary key PK_Artists in order to avoid any confusion.


When I want to save the table a box tells me that a primary key is compulsory and asks me if I want to create one. If I say Yes it creates a new field called ID.
The Base Guide 7.3 tells us: “A rule for naming fields in a table is that no two fields can have the same name.” My own rule is: “A rule for naming fields is that no two fields can have the same name in the whole database.” My naming convention proved extremely useful.
I couldn’t find a way to change the name ID neither how to make the PK_Artists field the primary key.
I have the same issue with foreign keys. One of the tables related to Artists will be Create so it’s primary key will be PK_Create and the corresponding foreign key will be FK_Create-Artists. No confusion is possible.
TIA
Nick

“Design Mode” (the grid view in screenshot) >
select the PK_Artists row >
right click > Pk

Hi
Thanks for your quick response.
I was thinking I had tried that but I probably didn’t do it right. My mistake.
And how to create a Foreign Key? The only option in this menu is “Primary key”. I made a search in the Help document and it yielded nothing. I eventually came across in the page [Relations](file:///Applications/LibreOffice.app/Contents/Resources/help/en-US/text/sdatabase/05020000.html?DbPAR=BASE#bm_id3148922) a section called Primary key and foreign keys with no hint about how to create one.
As a test I tried linking two tables. Both have a Primary key but the second called Create has no Foreign key. This is the result:


Event though I created the relationship from the Artists table’s Primary key to a field that’s not a key in the Create table (which has it’s primary key) Base assumes it’s Create the main table. It’s giving the SQL code whereas one can’t access the code.
I am afraid all this won’t work.
Nick

  1. Create table Artists
    PK_Artists - set pk | the other fields…
  2. Create table Create
    PK_CA - set pk | FK_Artists Integer (same type of PK_Artists of course) | the other fields
  3. GUI Relations > Add Tables > drag PK_Artists to FK_Artists in table Create
     
    Captura de tela 2026-05-06 190622
    Captura de tela 2026-05-06 190745
     
    EDIT
    To add a foreign key to Create, referencing Artists pk, you can run the reverse of the message’s SQL in Tools > SQL > Run directly
    of course. Then
ALTER TABLE "Create" [...]

Thanks for the tip but I am afraid the Mac version is not totally functional so I give up.
Nick

Sorry Holly, but using DDL statements from the Tools > SQL menu, this will also work in the macOS version.

Thanks again for your help but as a matter of fact my tests with Base are not convincing. I’ll look for another soft.
.