还有个问题
随机从表1抽30条记录条记录到表2,如果从表1抽了出来把记录记在表2里,之后把表1的那条记录马上删除,记录只记在表2里,这样会不会快一点,起马不用判断有没有重复了是吗?会不会好一点呀??CLOSE ALL
SET SAFETY OFF
SET DELETE OFF
SELECT 1
USE BIAO1
COPY TO BIAO2 STRUCTURY
SELECT 2
USE BIAO2
SELECT 1
SS=RECCOUNT()
I=1
DO WHILE I<=30
A=INT(RAND()*SS)
A=IIF(A<1,1,IIF(A>SS,SS,A))
GO A
SELECT 2
LOCATE ALL FOR 字段1=BIAO1.字段1
IF EOF()
APPEND BLANK
REPLACE 字段1 WITH BIAO1.字段1 &&,字段2 WITH BIAO1.字段2,...
I=I+1
ENDIF
SELECT 1
ENDDO
CLOSE ALL