表a
id a1 a2
----------
1 x y
表b
id x y
----------
1 10 9
2 9 20
<!--#include file="./conn/conn.asp"-->
<%
set rs1=server.CreateObject("adodb.recordset")
sql1="select * from a where id='1'"
rs1.open sql1,conn,1,1
k=rs1(1) '取出表a的第二个列的值,x
set rs2=server.CreateObject("adodb.recordset")
sql2="select * from b where id='1'"
rs2.open sql2,conn,1,1
y=rs2(k) '取出表b里字段为x的值
response.write(y)
%>