这个循环可以在sql中完成吗?
Dim ID(0 TO 2) as string
Dim number as string
ID="01"
ID="02"
For each number in ID
SELECT data FROM sheet1 WHERE data= number
next number
datatable:
data
01
01
02
03
04
答案 0 :(得分:1)
这可以使用IN
谓词:
SELECT data FROM sheet1 WHERE data IN(1, 2);