The Oracle PL/SQL WM_CONCAT function is used
to aggregate data from a number of rows into a single row, giving a
list of data associated with a specific value. In effect, it
cross-tabulates a comma delimited list.
select uc.table_name, uc.constraint_name, wm_concat(column_name) column_name
FROM user_cons_columns ucc, user_constraints uc
WHERE uc.constraint_name = ucc.constraint_name
AND uc.constraint_type IN ('P', 'U')
group by uc.table_name, uc.constraint_name
ORDER BY 1, 2;
select uc.table_name, uc.constraint_name, wm_concat(column_name) column_name
FROM user_cons_columns ucc, user_constraints uc
WHERE uc.constraint_name = ucc.constraint_name
AND uc.constraint_type IN ('P', 'U')
group by uc.table_name, uc.constraint_name
ORDER BY 1, 2;

কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন