VIEW / ORDER BY + UNION

From: "WeiShang" <thanks(at)verymuch(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: VIEW / ORDER BY + UNION
Date: 2005-02-17 15:46:59
Message-ID: cv2ea4$1cfv$2@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Brück 2005-02-17 15:58:24 No triggers visible for different user in information_schema.triggers
Previous Message pginfo 2005-02-17 15:12:38 Re: pg primary key bug?