USE 表1 IN 0
USE 表2 IN 0
? "方法一"
SELECT 表2
SCAN
SELECT 表1
LOCATE FOR hjdm=表2.hjdm AND hjxqdh=表2.hjxqdh
IF !FOUND()
? 表2.hjdm, 表2.hjxqdh,"不存在",表1.hjdm, 表1.hjxqdh
ENDIF
ENDSCAN
? "方法二"
SELECT 表1
INDEX on hjdm+hjxqdh TAG hh
SELECT 表2
SET RELATION TO hjdm+hjxqdh INTO "表1"
BROWSE FOR 表2.hjdm!=表1.hjdm OR 表2.hjxqdh!=表1.hjxqdh
? "方法三"
SELECT * FROM 表2 WHERE hjdm NOT in (SELECT hjdm FROM 表1) OR hjxqdh NOT in (SELECT hjxqdh FROM 表1)