Unknown column ‘ROOMNUMBER‘ in ‘where clause‘

wrong description:

 

org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: Unknown column 'ROOMNUMBER' in 'where clause'
### The error may exist in file [D:\java_project\hotel\target\classes\mapper\HotelGoodsDtoMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: DELETE FROM hotel_goods WHERE ROOMNUMBER = ?
### Cause: java.sql.SQLSyntaxErrorException: Unknown column 'ROOMNUMBER' in 'where clause'

Problem analysis and solution:

This error message is because a column name "ROOMNUMBER" that does not exist is referenced in the WHERE clause when executing the SQL statement. This could be because the column does not exist in the table or the column name is misspelled. It is recommended to check that the column names in the hotel_goods table are correct and make sure there is a column named "ROOMNUMBER". If the column name is correct and the column does not exist, you can manually add the column to resolve the issue.

Guess you like

Origin blog.csdn.net/weixin_58419099/article/details/131074211