WITH TEMP_TAB AS
2 (SELECT 'ABC' Col_1 FROM DUAL
3 UNION
4 SELECT 'DEF' FROM DUAL
5 UNION
6 SELECT 'GHI' FROM DUAL
7 )
8 SELECT Col_1 FROM TEMP_TAB
9* ORDER BY Col_1
10 ;
COL
---
ABC
DEF
GHI
3 rows selected.
SQL> ed
Wrote file afiedt.buf
1 WITH TEMP_TAB AS
2 (SELECT 'ABC' Col_1 FROM DUAL
3 UNION
4 SELECT 'DEF' FROM DUAL
5 UNION
6 SELECT 'GHI' FROM DUAL
7 )
8 SELECT
9 DECODE(COL_1, 'ABC', 2, 'DEF', 3, 'GHI', 1, 999)
10 SORT_1, COL_1 FROM TEMP_TAB
11* ORDER BY SORT_1
12 ;
SORT_1 COL
---------- ---
1 GHI
2 ABC
3 DEF
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Friday, September 11, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
No comments:
Post a Comment