方舟单机物品代码怎么:在asp中如何提取数据库查找结果?

来源:百度文库 编辑:中科新闻网 时间:2024/05/04 07:48:10
通过"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是数据库连接对象