pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: WeiShang <thanks@verymuch.com>
To: pgsql-sql@postgresql.org
Subject: VIEW / ORDER BY + UNION
Date: Thu, 17 Feb 2005 23:46:59 +0800
Message-ID: <cv2ea4$1cfv$2@news.hub.org> (raw)

Hi, I have created a view like this :

CREATE VIEW v1 AS (SELECT orderno,weekday,time FROM t1,t2 where
t1.orderno=t2.orderno);

if I create a SQL statment:

(SELECT orderno FROM v1 WHERE weekday='MON' ORDER BY orderno)
UNION
(SELECT orderno FROM v1 WHERE weekday='WED' ORDER BY orderno)
UNION
(SELECT orderno FROM v1 WHERE weekday='FRI' ORDER BY orderno);

Will the whole result will be sorted by the field orderno?

Thanks,
WeiShang














view thread (5+ messages)  latest in thread

Message-ID: <cv2ea4$1cfv$2@news.hub.org>
Permalink:  ../cv2ea4$1cfv$2@news.hub.org/
Also on:    postgresql.org/message-id/cv2ea4$1cfv$2@news.hub.org

 · 

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: thanks@verymuch.com
  Subject: Re: VIEW / ORDER BY + UNION
  In-Reply-To: <cv2ea4$1cfv$2@news.hub.org>

* 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