I can create a simple table by using SELECT. With that table I can’t set a primary key. I can copy that table and paste it back into my table list, giving it a new name, and I can select a primary key in the process. What makes these two tables behave differently?
As an example, I can manually create a table as shown in this image and populate it with simple data, as seen here. With it I can turn on and off the primary key with no problem. I can then do SELECT “recid”,“title” INTO TEXT “newtable” FROM “oldtable”. The “newtable” will not have a primary key and I can’t create one. I could then copy “newtable” and paste it to “newertable”. While doing so I can select field “recid” to be primary key. With “newertable” I can edit it and turn primary key off and on at will.
I am using LO 7.1.0.3 with embedded HSQLDB, on a Mac computer with OSX Catalina (10.16.7).