SQL错误“当没有用 EXISTS 引入子查询时,在选择列表中只能指定一个表达式。”

来源:百度知道 编辑:UC知道 时间:2024/05/17 11:05:23
"update person set logintime=(select name,password,personID,logintime from person where name='" + Text1.Value + "'and password='" + Password1.Value + "'and logintime='" + System.DateTime.Now.ToString() + "')where personID='" + Session["UserID"] + "'";
这查询语句是用来验证合法用户后更新登陆时间
"update person set logintime='" + System.DateTime.Now.ToString() + "'if exsist select name,password,personID,logintime from person where name='" + Text1.Value + "'and password='" + Password1.Value + "'";麻烦高手帮忙看看这个查询语句

你这句话目的不明确呀,查询的结果与条件是同一个字段,没有意思呀
QQ:397438944
update person set logintime=(select logintime from person where name='" + Text1.Value + "'and password='" + Password1.Value + ")where personID='" + Session["UserID"] + "'";
或者这样
update person set logintime'" + System.DateTime.Now.ToString() + "')where personID='" + Session["UserID"] + "'";
看一下你的要求是什么呀