[color=red]1、wmsys.wm_concat(columnName):分组合并函数[/color]
如:
这样就会一个人只有一条记录,多个角色名将会以逗号分隔且组合。
[color=red]2、误删除数据恢复[/color]
alter table tablename enable row movement
flashback table tablename to timestamp to_timestamp('2010-02-05 14:30:00','yyyy-mm-dd hh24:mi:ss')
如:
select
u.login_name
,wmsys.wm_concat(r.name) rNames
from User u inner join user_role ur on ur.user_id=u.id
inner join role r on ur.role_id=r.id
group by u.login_name
这样就会一个人只有一条记录,多个角色名将会以逗号分隔且组合。
[color=red]2、误删除数据恢复[/color]
alter table tablename enable row movement
flashback table tablename to timestamp to_timestamp('2010-02-05 14:30:00','yyyy-mm-dd hh24:mi:ss')