pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John McKown <joarmc@swbell.net>
To: Nema, Vivek <nema@softlink.ch>
Cc: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
Subject: Re: -query sql
Date: Mon, 9 Oct 2000 19:17:52 -0500 (CDT)
Message-ID: <Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net> (raw)
In-Reply-To: <F1B936B762A3D311A7440000C0FFE7DC0AE6BB@mail.softlink.ch>

On Tue, 3 Oct 2000, Nema, Vivek wrote:

> Hi!
>    a small query may be u can help me.
>  i just wanted to compare 2 columns in 2 tables.how can i do it in sql
> statement.i know it is possible somehow i am not able to write my query.
> i am using RDB 6.0
> 
> Any pointer or help will be highly appreciated.
> 

What is RDB? This list is for PostgreSQL. However, in general, suppose you
have column1 in table1 and column2 in table2, you can select rows where
they are equal by doing something like:

SELECT table1.column1, table1.another, table2.thisone,
FROM table1, table2
WHERE table1.column1=table2.column2;

Change the information you want in the first line of the SELECT. I just
made up some names.

Hope this helps,
John




view thread (2+ messages)

Message-ID: <Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net>
Permalink:  ../Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net/
Also on:    postgresql.org/message-id/Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: joarmc@swbell.net, nema@softlink.ch
  Subject: Re: -query sql
  In-Reply-To: <Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net>
  References: <F1B936B762A3D311A7440000C0FFE7DC0AE6BB@mail.softlink.ch> <Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net>

* 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