1、将oracle表结构导出来
SELECT T1.COLUMN_ID,
T1.COLUMN_NAME,
T2.COMMENTS,
DECODE(T1.DATA_SCALE,
NULL,
T1.DATA_TYPE || '(' || T1.DATA_LENGTH || ')',
T1.DATA_TYPE || '(' || T1.DATA_LENGTH || ',' || ',' || T1.DATA_SCALE || ')'),
DECODE(t1.NULLABLE,'Y','N','N'),
t1.NULLABLE,
t1.TABLE_NAME
FROM USER_TAB_COLUMNS T1
LEFT JOIN USER_COL_COMMENTS T2
ON T1.COLUMN_NAME = T2.COLUMN_NAME
AND T1.TABLE_NAME = T2.TABLE_NAME
ORDER BY t1.TABLE_NAME,t1.COLUMN_ID
2、将表personapply表中的SLWDBH(申领网点编号)和 ZJHM(证件号码)两个字段选出来,然后拼接成
update personapply set SLWDBH = #SLWDBH# where PERSONAPPLYID =#ZJHM#
select 'update personapply set SLWDBH = '''|| SLWDBH ||''' where PERSONAPPLYID = '''||ZJHM||''''||';' from personapply