Re: PostgreSQL in Comparison to mySQL

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: GH <grasshacker(at)over-yonder(dot)net>
Cc: Jason <jason(at)op480(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: PostgreSQL in Comparison to mySQL
Date: 2001-05-15 09:58:43
Message-ID: Pine.BSF.4.30.0105150557010.5548-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 14 May 2001, GH wrote:

> On Mon, May 14, 2001 at 02:07:03PM -0700, some SMTP stream spewed forth:
> > Hi,
> >
> *snip*
> > My questions revolve mostly among joined selects and auto_increment (serial
> > in pg) syntaxes.
> >
> > Can joined selects in pg be accomplished the same way as in mySQL?
> > ie- "select person_name, person_age from names, ages where names.id=4 and
> > names.id=ages.person_id"
>
> Yes.
> You can even do:
> select person_name, person_age from names n, ages a where n.id='4' and
> n.id=a.person_id
>
> BUT, you must single-quote attribute values, e.g. id, etc.

I was under the impression id was a serial and therefore an int. You
don't need to quote and int:

asdf=# select person_name, person_age from names, ages where
names.personid=3 and names.personid=ages.personid;
person_name | person_age
-------------+------------
ralph | 12
(1 row)

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com http://www.pop4.net
56K Nationwide Dialup from $16.00/mo at Pop4 Networking
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2001-05-15 10:40:08 Re: Re: Internet is putting lot of competition fire & heat under Microsoft SQL Server
Previous Message Justin Clift 2001-05-15 09:58:41 Re: Writing Result to Disk (psql)