Re: -query sql - Mailing list pgsql-sql

From John McKown
Subject Re: -query sql
Date
Msg-id Pine.LNX.4.21.0010091915330.28048-100000@linux2.johnmckown.net
Whole thread Raw
In response to -query sql  ("Nema, Vivek" <nema@softlink.ch>)
List 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



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: "Delete before" in ms sql?
Next
From: Michael Fork
Date:
Subject: Re: AW: Table Attribute Help