2

I have set a column name to "group", which turned out to be a reserved word. Now I try to change the name to "group_code", but I get an error. I try:

ALTER TABLE task_values CHANGE group group_code VARCHAR(40) NOT NULL;

and

ALTER TABLE task_values CHANGE 'group' group_code VARCHAR(40) NOT NULL;

but both fail, I get "No such element" error. Please help

1 Answer 1

2

You will need to use backticks around group which, as you said, is a mysql reserved keyword

ALTER TABLE task_values CHANGE `group` group_code VARCHAR(40) NOT NULL;
Sign up to request clarification or add additional context in comments.

Comments

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.