1

While dropping constraint named 123_5_pk_not_null, I am getting syntax error at the start of constraint name.

Query:

alter table table_name drop constraint 123_5_pk_not_null;

Error:

Syntax error at or near 123

Need to drop the constraint

5
  • 2
    try double quotes around the constraint name Commented Oct 27, 2022 at 17:46
  • Does this answer your question? Table or column name cannot start with numeric? Commented Oct 27, 2022 at 17:46
  • Tried double quotes as well as single quotes. But didn’t work Commented Oct 27, 2022 at 18:41
  • alter table table_name drop constraint "123_5_pk_not_null"; Commented Oct 27, 2022 at 19:13
  • The above query will not work Commented Oct 27, 2022 at 20:56

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.