2

I am having a table in mysql, and in that i am having two fields that is id and desc, now as desc is a mysql keyword, i am unable to update that field because mysql is giving syntax error, so i thought why not update that field by using alias, i used it but not working, is there any way to update that field using alias. Please help! I need it very badly. Thanks Ravinder

1 Answer 1

1

Try with:

UPDATE t1 SET `desc`='NEW VAL'

Notice the single backquotes ( ` ) around the desc field name

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.