表中字段追加问题,请高手指导帮助!
表结构追加.rar
(830 Bytes)
CLOSE DATABASES SELECT * FROM 需追加字段表 INTO CURSOR t1 AFIELDS(aStr) SELECT * FROM 原表 INTO CURSOR t2 READWRITE && 不喜欢对基础表操作,故用临时表替代 FOR ln = 1 TO ALEN(aStr, 1) IF TYPE("t2." + aStr[ln, 1]) == "U" ALTER TABLE t2 ADD &aStr[ln, 1] &aStr[ln, 2] (aStr[ln, 3], aStr[ln, 4]) ENDIF ENDFOR MODIFY STRUCTURE