Re: -query sql

From: John McKown <joarmc(at)swbell(dot)net>
To: "Nema, Vivek" <nema(at)softlink(dot)ch>
Cc: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: -query sql
Date: 2000-10-10 00:17:52
Message-ID: Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

  • -query sql at 2000-10-03 08:16:02 from Nema, Vivek

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fork 2000-10-10 17:21:14 Re: AW: Table Attribute Help
Previous Message Josh Berkus 2000-10-10 00:10:15 Re: "Delete before" in ms sql?