<s>
An	O
SQL	B-Language
UPDATE	I-Language
statement	O
changes	O
the	O
data	O
of	O
one	O
or	O
more	O
records	O
in	O
a	O
table	B-Application
.	O
</s>
<s>
Either	O
all	O
the	O
rows	O
can	O
be	O
updated	O
,	O
or	O
a	O
subset	O
may	O
be	O
chosen	O
using	O
a	O
condition	B-Language
.	O
</s>
<s>
For	O
the	O
UPDATE	O
to	O
be	O
successful	O
,	O
the	O
user	O
must	O
have	O
data	O
manipulation	O
privileges	O
(	O
UPDATE	O
privilege	O
)	O
on	O
the	O
table	B-Application
or	O
column	B-Application
and	O
the	O
updated	O
value	O
must	O
not	O
conflict	O
with	O
all	O
the	O
applicable	O
constraints	O
(	O
such	O
as	O
primary	B-Application
keys	I-Application
,	O
unique	O
indexes	O
,	O
CHECK	B-Language
constraints	I-Language
,	O
and	O
NOT	O
NULL	B-Language
constraints	O
)	O
.	O
</s>
<s>
In	O
some	O
databases	O
,	O
such	O
as	O
PostgreSQL	B-Application
,	O
when	O
a	O
FROM	B-Language
clause	I-Language
is	O
present	O
,	O
what	O
essentially	O
happens	O
is	O
that	O
the	O
target	O
table	B-Application
is	O
joined	O
to	O
the	O
tables	O
mentioned	O
in	O
the	O
fromlist	O
,	O
and	O
each	O
output	O
row	O
of	O
the	O
join	O
represents	O
an	O
update	O
operation	O
for	O
the	O
target	O
table	B-Application
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
target	O
row	O
should	O
n't	O
join	O
to	O
more	O
than	O
one	O
row	O
from	O
the	O
other	O
table(s )	O
.	O
</s>
<s>
Set	O
the	O
value	O
of	O
column	B-Application
C1	O
in	O
table	B-Application
T	O
to	O
1	O
,	O
only	O
in	O
those	O
rows	O
where	B-Language
the	O
value	O
of	O
column	B-Application
C2	O
is	O
"	O
a	O
"	O
.	O
</s>
<s>
In	O
table	B-Application
T	O
,	O
set	O
the	O
value	O
of	O
column	B-Application
C1	O
to	O
9	O
and	O
the	O
value	O
of	O
C3	O
to	O
4	O
for	O
all	O
rows	O
for	O
which	O
the	O
value	O
of	O
column	B-Application
C2	O
is	O
"	O
a	O
"	O
.	O
</s>
<s>
Increase	O
value	O
of	O
column	B-Application
C1	O
by	O
1	O
if	O
the	O
value	O
in	O
column	B-Application
C2	O
is	O
"	O
a	O
"	O
.	O
</s>
<s>
Prepend	O
the	O
value	O
in	O
column	B-Application
C1	O
with	O
the	O
string	O
"	O
text	O
"	O
if	O
the	O
value	O
in	O
column	B-Application
C2	O
is	O
"	O
a	O
"	O
.	O
</s>
<s>
Set	O
the	O
value	O
of	O
column	B-Application
C1	O
in	O
table	B-Application
T1	O
to	O
2	O
,	O
only	O
if	O
the	O
value	O
of	O
column	B-Application
C2	O
is	O
found	O
in	O
the	O
sublist	O
of	O
values	O
in	O
column	B-Application
C3	O
in	O
table	B-Application
T2	O
having	O
the	O
column	B-Application
C4	O
equal	O
to	O
0	O
.	O
</s>
<s>
Some	O
databases	O
allow	O
the	O
non-standard	O
use	O
of	O
the	O
FROM	B-Language
clause	I-Language
:	O
</s>
<s>
Or	O
on	O
Oracle	O
systems	O
(	O
assuming	O
there	O
is	O
an	O
index	B-Data_Structure
on	O
classification.articleID	O
)	O
:	O
</s>
<s>
With	O
long	O
name	O
of	O
table	B-Application
:	O
</s>
<s>
See	O
Halloween	B-General_Concept
Problem	I-General_Concept
.	O
</s>
<s>
It	O
is	O
possible	O
for	O
certain	O
kinds	O
of	O
UPDATE	O
statements	O
to	O
become	O
an	O
infinite	B-Algorithm
loop	I-Algorithm
when	O
the	O
WHERE	B-Language
clause	O
and	O
one	O
or	O
more	O
SET	O
clauses	O
may	O
utilize	O
an	O
intertwined	O
index	B-Data_Structure
.	O
</s>
