Search Postgresql Archives

Re: SQL query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/18/19 11:36 AM, Ravi Krishna wrote:
Not able to produce this with PG 11.1

If col1 is any type other than boolean, the update statement fails in syntax.
If col1 is boolean, then it updated it correctly.  In other words
    update col1 = NULL
     and col2 in (1,2)
is treated same as
    update col1 = NULL
      where col2 in (1,2)

The above is not the same format as OP's query:

Update tableA set col1 = null and col2 in (1,2);

Also I checked it on DB2 which rejected the UPDATE sql as bad syntax, as expected.






--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux