Forum > Databases

[SOLVED] SQLite delete a record with no visible ID

(1/2) > >>

Hello forum members, we have a database: id, Name, Surname, Age, City.
we ask 'SELECT Name, Surname, Age, City FROM table'. How can you, for example, delete a record if we do not have access to id?

You can delete with a more elaborate WHERE clause like
delete from table where name:='a' and surname:='b' and etc.
But you risk deleting possible duplicates of people with the same name and age in the same city (this could happen).

But why don't you have access to the ID?
You should always include it.
You could hide it from grids but it should be there.

Not to have the PK is a design fault.

there is an id in the project, but I don't want to see it in the table


--- Quote from: af0815 on September 25, 2022, 05:51:36 pm ---Not to have the PK is a design fault.

--- End quote ---
And a big one.


[0] Message Index

[#] Next page

Go to full version