Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

wm_concat(column_name) order by [SOLVED]

LudockAug 6 2008 — edited Aug 8 2008
The question is based on a other thread:
425510

Aketi Jyuuzou Posted: Nov 23, 2007 3:17 AM

with the next statement there will be 4 records displayed
(there are 4 columns for this constraint)

select constraint_name, wm_concat(column_name) over(order by position) as column_names
from user_cons_columns
where constraint_name='EUL5_DOC_UK_2'

1 EUL5_DOC_UK_2 DOC_EU_ID
2 EUL5_DOC_UK_2 DOC_EU_ID,DOC_NAME
3 EUL5_DOC_UK_2 DOC_EU_ID,DOC_NAME,DOC_BATCH
4 EUL5_DOC_UK_2 DOC_EU_ID,DOC_NAME,DOC_BATCH,DOC_FOLDER_ID

is it possible to select only the last (4) record?

Thanks in advance..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 5 2008
Added on Aug 6 2008
6 comments
50,133 views