Visual FoxPro中的SQL嵌套查询

2025-05-11 01:21:35
推荐回答(1个)
回答(1):

foxpro 中 SQL 是不能嵌套的。
SQL IN 子句支持第2个 SQL 语句,但不是你这样用
(从t1中筛选id符合t2中id的数据)
select * from t1 where t1.id IN(select t2.id from t2)
SQL UNION 子句支持第2个 SQL 语句,但也不是你这样用
(把 t1 和 t2 合并)
select * from t1 union select * from t2