UPDATE update without affecting all table rows without ID

Asked

Viewed 47 times

1

I received a table with information from some customers and I needed to give UPDATE but as the table has no ID and most of the data repeat including Cpf there is some way to give Where only on the selected line?

  • Did you design the table before creating it? Did you make the Entity and Relationship Diagram (DER)? Probably if it were well designed it would have a Primary Key. I suggest you see https://stackoverflow.com/questions/2186460/why-use-primary-keys

1 answer

0

Placing various conditions on WHERE and a limit on 1 EX:

UPDATE usuarios set name = 'SEU NOME' WHERE CPF = '123' and IDADE = '13' and RG = '433' and SOBRENOME = 'SOBRENOME' LIMIT 1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.