我试图在MS sql 2012 Express上运行以下查询:
Select ( Select Id,Salt,Password,BannedEndDate from Users where username = '" + LoginModel.Username + "' ),( Select Count(*) From LoginFails where username = '" + LoginModel.Username + "' And IP = '" + Request.ServerVariables["REMOTE_ADDR"] + "')" );
但是我收到以下错误:
Only one expression can be specified in the
select
list when the subquery is not introduced withEXISTS
.
如何解决这个问题?