tb1 name score
tb2 name score
数据
李四 22
张三 11
王五 33
麻子 44
<!--#include file="conn.asp"-->
<%
Set RS=conn.Execute("select * from tb1 union select * from tb2 order by score")
do while not RS.eof
%>
id:<% =RS(1) %><p>
name:<% =RS(2) %><p>
score:<% =RS(3) %><p>
<hr>
<%
RS.movenext
loop
RS.Close
conn.Close
Set RS = Nothing
Set conn = Nothing
%>
查询出
张三 11
李四 22
王五 33
麻子 44