Simple SQL-syntax

From: "Fredrik Thunberg" <fredrik(at)datessa(dot)se>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Simple SQL-syntax
Date: 2001-08-20 11:15:33
Message-ID: 01a501c12969$6e397a10$7100000a@intern.datessa.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Raymond Chui 2001-08-20 14:08:36 How to execute a system file in procedure?
Previous Message macky 2001-08-20 04:05:04 Altering pg_conndefaults