At 02:59 PM 3/21/2001 +, soon chee keong wrote:
>Table_1
>
>-
> A B C
>-
> 1018 9
> 4 3 1
>--
>
>how can i change column C's "9" to say "20" without inserting a new record
>and columns A and B
That depends.
Just the one 9, or all instances of 9 in 'C'?
This is a basic SQL question, not a MySQL question.
I would suggest finding a book on SQL.
You could try:
update Table_1 set c=20 where a=10 and b=18 and c=9;
This will guarantee that only the first line ( O one just like it ) will
be
UPDATE Table_1 SET C = 20 WHERE A = 10 AND B = 18
you might want to read a basic SQL book before asking this type of
question
HTH,
christopher oson
-Original Message-
From: soon chee keong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 6:59 AM
To: [EMAIL PROTECTED]
Subj
On Wed, 21 Mar 2001 14:59:38 -, "soon chee keong" <[EMAIL PROTECTED]>
wrote:
A very basic UPDATE will do the trick.
UPDATE Table_1 SET
C = '20'
WHERE C = '9'
>>Table_1
>>
>>-
>> A B C
>>-
>> 1018 9
>> 4 3 1
>>-
update table_1 set C="20" where C="9";
Cal
http://www.calevans.com
-Original Message-
From: soon chee keong [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 21, 2001 8:59 AM
To: [EMAIL PROTECTED]
Subject: replace qeustion
Table_1
-
A B C