7 messages in com.mysql.lists.mysqlRe: Newbie Question on Update| From | Sent On | Attachments |
|---|---|---|
| Kraer, Joseph | 30 Nov 2005 08:58 | |
| Michael Stassen | 30 Nov 2005 09:08 | |
| ISC Edwin Cruz | 30 Nov 2005 09:11 | |
| SGr...@unimin.com | 30 Nov 2005 09:13 | |
| mel list_php | 30 Nov 2005 09:16 | |
| Kraer, Joseph | 30 Nov 2005 09:20 | |
| Peter Brawley | 30 Nov 2005 14:12 |
| Subject: | Re: Newbie Question on Update![]() |
|---|---|
| From: | Peter Brawley (pete...@earthlink.net) |
| Date: | 11/30/2005 02:12:04 PM |
| List: | com.mysql.lists.mysql |
Joseph
update table set column5 = number1 where column 1 = number2 and column1 = number3
but it is not working. I tried listing the conditions separated by commas (where column 1 = number2, column1 = number3) and also didn't work. What am I doing wrong?
No commas in the WHERE clause. WHERE ... AND ... '
'Where column 1 = ...' is wrong. If by 'column 1' you mean 'column1', your condition can hold only when number2=number3, in which case the 'and' clause is apparently superfluous.
Otherwise, you'll have to tell us what you mean by "not working".
PB
-----
Kraer, Joseph wrote:
I am trying to update a couple of rows in a table by doing the following:
update table set column5 = number1 where column 1 = number2 and column1 = number3
but it is not working. I tried listing the conditions separated by commas (where column 1 = number2, column1 = number3) and also didn't work. What am I doing wrong?
Thanks in advance,
Joseph "Tito" Kraer Business Systems Analyst Taylor, Bean & Whitaker Mortgage Corp
-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005




