Oracle's view of the joint inquiry add Scheduling

Modification in the company bug, there is such a demand: the need to find out the data from the same field of view of the two, according to the instructor's name before ordering, reordering according to student number

union联合两张表,SELECT * from((SELECT DS_ID,PYLX_ID,YX_ID,DS_XM,XH,XM FROM PY_VIEW_YJSXX WHERE ID IN ('720c8511d1994434a55dae6f545652bc') )UNION ALL(SELECT DS_ID,PYLX_ID,YX_ID,DS_XM,XH,XM FROM PY_VIEW_ZJSXX WHERE ID IN ( '11' ) )) xsxx

ORDER BY
NLSSORT( xsxx.DS_XM, 'NLS_SORT = SCHINESE_PINYIN_M' ),
xsxx.XH

Then there is the above sql statement, is now head of the hands-on teaching

Guess you like

Origin www.cnblogs.com/superhonors/p/11388085.html