我写了一段用户登录代码(strut+spring+hibernate),但是竟然出现以下错误,是什么原因呢?
Hibernate operation: could not execute query; uncategorized SQLException for SQL [select user0_.id as id, user0_.username as username0_, user0_.password as password0_ from test.dbo.user user0_ where user0_.username=? and user0_.password=?]; SQL state [HY000]; error code [156]; [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]在关键字 'user' 附近有语法错误。; nested exception is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]在关键字 'user' 附近有语法错误。
Hibernate operation: could not execute query; uncategorized SQLException for SQL [select user0_.id as id, user0_.username as username0_, user0_.password as password0_ from test.dbo.user user0_ where user0_.username=? and user0_.password=?]; SQL state [HY000]; error code [156]; [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]在关键字 'user' 附近有语法错误。; nested exception is java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]在关键字 'user' 附近有语法错误。
腰缠70元到月入近10万
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=453IT工程师 毕业4年我年薪涨到30万
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=51126岁青年坐拥千万域名资产 从小玩家变成CEO
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=515程序员的酸甜苦辣:告别Coding
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=341从月薪3500到700万(一)
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=170网络草根月赚3000的十种方法
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=517如果我是女的 我肯定不会嫁给做网站的
http://www.hunbei.com.cn/Article/ArticleShow.asp?ArticleID=512
USER关键字是系统保留字,是不允许直接使用的,否则会出现错误
如果非要使用,请这样写[USER]