VB6怎样从sql结果中再执行sql语句

来源:百度知道 编辑:UC知道 时间:2024/07/04 03:54:47
VB6怎样从一个sql语句执行的结果中再执行sql语句查询
详细点嘛

不是嵌套,应该是把查询结果当表来进行查询,如下语句
select * from (select * from user_table where user_dept='admin') where user_name='me'

在sql语句中使用嵌套查询就可以了吧?
类似这样:select * from user_table where userId = (select userId from account_table where accountId = '001001');

如果子查询有多条结果的话,那么可以用in
select * from user_table where userId in (select userId from account_table where accountId = '001001');

不知是不是你想要的结果。

用类调用