俺们有时要用,大家分析一下。 Parent Table P Child Table C 1 to many PK_FK is PID. 我们要output到text文件,格式如下(各种都有,只是一个例子): P_INDICATOR|P1|P1Data1|P1Data2...... C_INDICATOR|Line_Number|C11Data1|C11Data2..... (child of P1) C_INDICATOR|Line_Number|C12Data1|C12Data2..... (child of P1) P_INDICATOR|P2|P2Data1|P2Data2...... C_INDICATOR|Line_Number|C21Data1|C21Data2..... (child of P2) C_INDICATOR|Line_Number|C22Data1|C22Data2..... (child of P2) 俺们就用union,呵呵。