2,497
社区成员
发帖
与我相关
我的任务
分享
'select ip from abc where 编号 = ' // ''里的内容是字符串
IntToStr(i) // 函数返回一个字符串, 假设i 为100
'select ip from abc where 编号 = ' + IntToStr(i) // 即两个字符串拼接
// 拼接后的结果就是如下这个字符串
'select ip from abc where 编号 = 100'
你需要先学习sql基础
ADOQuery1.SQL.Add('select ip from abc where 编号 = ' + IntToStr(i));