Re: update table
Posted in 1997
devis wrote:
>
> I have update rows in a table
>
> In Oracle I write:
>
> update from table set field_table=val where field_table=x
>
> I try in Informix but not do this
I can't follow the Oracle syntax above because you have not given a
table name I can see.
In Informix (an I think ALL SQLs):
update mytable set colm = value, coln = value2 ...
where some-condition
Alternative syntax:
update mytable set (colA, colB, colC..) = (value1, value2, value3..)
where some-condition
String values should be in quotes, unless you are in a PREPARED
statement. (If you do not know what a PREPAREd statement is, you have
much to read.)
--
-- Jake (In persuit of undomesticated aquatic avians)
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+