1
I have a problem executing an UPDATE command in my Database...
My table has 2 columns:
-Column 1: link (PK) varchar
-Column 2: varchar status
I need to update only the "statuz" field of my table.
*change the value from "NEW" to "DISPLAYED"
Follow the SQL I’m using:
UPDATE toyota_base SET statuz = 'VISUALIZADO' WHERE link = '/comprar/toyota/etios/1-3-x-16v-flex-4p-manual/4-portas/2013/14102343';
The problem:
The update is not working...I run the command, but it has no effect.
The DBMS output indicates that there was no syntax error and the command was executed, however: 0 Row(s) Afectted
I’m asking you to help me solve this.
With this syntax you run the risk of updating a line you do not want. What is the "type" of the LINK column ?
– Motta
@Motta, ptz...this would be a problem. But these link column records are unique as they are Primary key the type is varchar...
– Charles Fay
Is that past example of your solution everything that has a string with "link" in any position would be updated.
– Motta
Got it, thanks for the clarification...but in my case this option served me because the final code of each link is unique, there will be the problem of updating other lines...
– Charles Fay