VIEW / ORDER BY + UNION - Mailing list pgsql-sql

From WeiShang
Subject VIEW / ORDER BY + UNION
Date
Msg-id cv2ea4$1cfv$2@news.hub.org
Whole thread Raw
Responses Re: VIEW / ORDER BY + UNION  (Bruno Wolff III <bruno@wolff.to>)
List 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













pgsql-sql by date:

Previous
From: CoL
Date:
Subject: Re: VIEW / ORDER BY + UNION
Next
From: "T- Bone"
Date:
Subject: Comments on subquery performance