中国驾照国际认证:在asp中如何提取数据库查找结果?

来源:百度文库 编辑:神马品牌网 时间:2024/05/10 07:40:54
通过"select top 1 id from table_name where 1=1 order by id desc"
找到id 的最大值,然后用什么语句来显示这一结果?在asp中

sql="select top 1 id from table_name where 1=1 order by id desc"

set rs=conn.execute(sql)
if not rs.eof then
response.write(rs("id"))
end if

'conn是数据库连接对象