I'm trying to code a general 'update' function for all my tables. However, the name of the primary keys is different for each of them. So is it possible, instead of using the name of the primary key column, to use something like which would automatically select the primary key column ?
UPDATE .... WHERE PRIMARY KEY = 'id_number'
Thanks!
Edit: Sorry, it seems I'm not clear, but I must admit I'm really not an expert. So the idea is that I would like it to work on tables that all have only one INT type primary key column. And I would like if possible to avoid making two queries (one for getting the name of the primary key column + the query itself). At first, I wanted to avoid having to make sure I have the right name of the column for each table (mo_id, rc_id etc...).