Search Postgresql Archives

Re: Populate Table From Two Other Tables

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

 



Rich Shepard wrote:
  I'm surprised: that worked! I thought the WHERE clause was looking for
equivalency, not an assignment.

SQL generally uses "=" to mean equality test, but sometimes it also uses "=" to mean assignment; it depends on the context; eg, in an UPDATE statement it can have both meanings:

  update mytbl
    set foo = 3
    where bar = 5;

Though procedural SQL also uses ":=" to mean assignment.

Thinking that "=" could only ever mean assignment is rather short-sighted; while many programming languages do that, many more don't.

-- Darren Duncan

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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