Oracle存储过程如下,用游标输出结果:
procedure proc_xcxf_detail(v_sbh varchar2,
v_szpq varchar2,
p_cursor OUT SYS_REFCURSOR)
is
begin
open p_cursor FOR
SELECT A.SBH, A.MC AS NSRMC, SUBSTR(A.SBH, 1, 2) AS NSR_PROVINCE,
SUBSTR(A.SBH, 3, 2) AS NSR_CITY_2, SUBSTR(A.SBH, 1, 4) AS NSR_CITY,
SUBSTR(A.SBH, 5, 2) AS NSRSZQ_2, B.DM AS NSRSZQ, B.HY AS NSRSZQMC,
SUBSTR(A.SBH, 8, 2) AS SWSID_2, C.DM AS SWSID, C.MC AS NSRSZSMC,
SUBSTR(A.SZPQ, 9, 2) AS SZPQ_2, D.DM AS SZPQ, D.HY AS SZPQMC,
E.DM AS HYDM, E.HY AS HYMC, A.SWDJZZH, F.DM AS NSRZTDM, F.HY AS NSRZT,
A.BSRYLXDH AS NSR_TEL, A.JYDZ AS NSR_ADDRESS, A.FDDBR, A.CWFZR,
A.BSRY, G.DM AS ZCLX, G.HY AS ZCLXMC, H.GLBBH AS FPLGB, I.SBH AS TEMP1,
I.SQSJ AS TEMP2, I.SPYJ AS SNZSFS, J.SBH AS YWSSYH, A.JYFWZY AS JYFW,
decode(A.GGHBZ, '1', '1', '2') AS GGHBZ
from GLFW_SWDJ A, FP_GLBFF H, GLFW_QYSDS_HDSQ I, GLFW_RD J, DM_ZSDW C,
DM_SZPQ D, DM_HYDM E, DM_NSRZT F, DM_ZCLX G, DM_SWJG B
WHERE A.SBH
我对SQL SERVER和ACCESS比较熟,所以数据库的通用基础东西可以说都掌握的差不多了,我现在想要的就是以上两数据库的独特之处的介绍和应用介绍。
另外书最好对应最新版本 oracle是11g吧 10的也行;mysql是5.1吧
谢 ......