我的代码执行良好,但在我的 java 输出上执行后,它显示无效列名帐户的错误。
这是我的查询字符串,
{
String sql =
"SELECT [account]" +"[date]
FROM [reports].[dbo].[acc]
WHERE [account='"+str+"'";
}
异常(exception):
Exceptioncom.microsoft.sqlserver.jdbc.SQLServerException: The column name account is not valid
最佳答案
试试这个:
{
String sql =
"SELECT [account]," +"[date]
FROM [reports].[dbo].[acc]
WHERE [account]='"+str+"'";
}
关于java - 列名无效 "account",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58288332/