0

I am trying to update/reset User password in HANA Database using SQL query(JDBC) like below, but getting sql syntax error.

Query:

ALTER USER TEST_USER PASSWORD Marc@4321

Error:

SAP DBTech JDBC: [257] (at 35): sql syntax error: incorrect syntax near "@": line 1 col 35 (at pos 35)

How to escape special characters in Hana DB SQL query?

0

1 Answer 1

1

That's easy to do by enclosing the new password in double-quotation marks:

ALTER USER TEST_USER PASSWORD "Marc@4321"
1
  • Thanks @Lars Br. your answer worked. It is working without double-quotation marks only if password doesn't contain any special characters.
    – Ram
    Jul 29, 2020 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.