注册 登录
编程论坛 ASP技术论坛

SQL语句

towering 发布于 2008-10-31 15:08, 825 次点击
conn.execute("select top 1 userid from [user] where name='"&name&"'").eof

请问这个语句是什么意思呀?

在MS SQL数据库中能执行吗?

谢谢!!!
6 回复
#2
hmhz2008-10-31 15:12
不能
#3
towering2008-10-31 15:19
版主怎么不说一个这个语句是什么意思呀?

要想在MS SQL数据库中执行,应该怎么写呀?

谢谢!!!
#4
lili06102008-10-31 15:37
查询user表一条记录,并且name等于得到的name
#5
hmhz2008-10-31 15:37
Set Rs=conn.execute("select top 1 userid from [user] where name='"&name&"'")
if not(Rs.eof and Rs.bof) then
    Response.Write(Rs("userid"))
end if
Rs.Close
#6
towering2008-10-31 15:39
万分感谢 !!!
#7
shcms2008-11-03 14:20
conn.execute("select top 1 userid from [user] where name='"&name&"'").eof


查询一条记录 执行 USER 表里的 NAME字段 与传过来的NAME字段相符
1