Open gai410388544 opened 5 months ago
Hi @gai410388544 looks like your updating existing table. The error in your query is due to the incorrect syntax for an INSERT statement. In SQL, you cannot have a WHERE clause with an INSERT statement. If you intend to insert a new record, the correct syntax. you can try the below
String query = "UPDATE users SET status = :status WHERE name = :name";
int result = session.createQuery(query)
.setParameter("status", "updated")
.setParameter("name", "data")
.executeUpdate();
line 44 wrong mark as 46