以下是引用mywisdom88在2017-9-21 17:37:05的发言:
如果是VFP9就简单了.
DELETE cgf from cgf where aa in (SELECT cc FROM wt )
DELETE cgf from cgf,wt where wt.cc==cgf.aa
都可以
但如果删除不等于的,
DELETE cgf from cgf where aa not in (SELECT cc FROM wt ) && 正常
DELETE cgf from cgf,wt where wt.cc <> cgf.aa &&有问题
如果是VFP9就简单了.
DELETE cgf from cgf where aa in (SELECT cc FROM wt )
DELETE cgf from cgf,wt where wt.cc==cgf.aa
都可以
但如果删除不等于的,
DELETE cgf from cgf where aa not in (SELECT cc FROM wt ) && 正常
DELETE cgf from cgf,wt where wt.cc <> cgf.aa &&有问题
DELETE cgf from cgf,wt where wt.cc <> cgf.aa &&有问题
改为DELETE cgf from cgf,wt where allt(wt.cc) <> allt(cgf.aa) 试试