Re: Simple SQL-syntax

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: Simple SQL-syntax
Дата
Msg-id web-105060@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Simple SQL-syntax  ("Fredrik Thunberg" <fredrik@datessa.se>)
Список pgsql-sql
Fredrik,

> I have a very simple sql-question from an sql-beginner:

Sure.  Keep in mind that there is a pgsql-newbie list.  Also quite a few
good books on the topic, including: Database Design for Mere Mortals and
SQL for Smarties.

> 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;

This should work.  What error message are you getting?  And what version
of Postgres are you using?

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Вложения

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Michael Ansley (UK)"
Дата:
Сообщение: RE: Simple SQL-syntax
Следующее
От: "Robby Slaughter"
Дата:
Сообщение: RE: Simple SQL-syntax