pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: gvim <gvimrc@gmail.com>
To: pgsql sql <pgsql-sql@postgresql.org>
Subject: Add one column to another
Date: Thu, 25 Aug 2011 15:21:02 +0100
Message-ID: <4E565A4E.9060400@gmail.com> (raw)

I have to deal with a table which contains:

first_name
surname
email1
email2

... and I would like to create a view which combines both email columns thus:

first_name
surname
email

It looks simple but I can't think of an obvious query.

gvim



view thread (7+ messages)  latest in thread

Message-ID: <4E565A4E.9060400@gmail.com>
Permalink:  ../4E565A4E.9060400@gmail.com/
Also on:    postgresql.org/message-id/4E565A4E.9060400@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gvimrc@gmail.com
  Subject: Re: Add one column to another
  In-Reply-To: <4E565A4E.9060400@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox