Simple SQL-syntax - Mailing list pgsql-sql

From Fredrik Thunberg
Subject Simple SQL-syntax
Date
Msg-id 01a501c12969$6e397a10$7100000a@intern.datessa.se
Whole thread Raw
Responses Re: Simple SQL-syntax  ("Josh Berkus" <josh@agliodbs.com>)
RE: Simple SQL-syntax  ("Robby Slaughter" <webmaster@robbyslaughter.com>)
List pgsql-sql
Hello.
 
I have a very simple sql-question from an sql-beginner:
 
Suppose I have Table A looking something like this:
 
Index    Text    NrA
 
And Table B like this:
 
NrA    NrB
 
Then I want to change all occurences of NrA in Table A to NrB...
 
I've tried:
 
UPDATE tableA Set tableA.nrA = B.nrB From tableB B Where tableA.nrA = B.nrA;
 
But that doesn't seem to work...
 
Best regards
 
/Fredrik Thunberg

pgsql-sql by date:

Previous
From: "macky"
Date:
Subject: Altering pg_conndefaults
Next
From: Christophe Labouisse
Date:
Subject: pg_ctl start hangs