CREATE CURSOR 表1(a1 i,a2 i,a3 i)
CREATE CURSOR 表2(b1 i,b2 i)
FOR i= 1 TO 100
INSERT INTO 表1(a1,a2,a3) values(i,i*10,i*100)
INSERT INTO 表2(b1,b2) values(i*100+1,i*100+2)
ENDFOR
SELECT a.a1,a.a2,a.a3,b.b1,b.b2 FROM (SELECT a1,a2,a3,RECNO() as a4 FROM 表1)a ;
left JOIN (select b1,b2,RECNO() as b3 FROM 表2)b ;
ON a.a4=b.b3 ;
INTO CURSOR 表3 READWRITE
BROWSE
*表3就是你的数据