0

The code that i tried is

ALTER TABLE "STUDENT" RENAME COLUMN "Roll" TO "Num";

Its syntax is correct but it shows a error. Whats the problem?

Error

Static analysis:

1 errors were found during analysis.

Missing comma before start of a new alter operation. (near "TO" at position 47) SQL query: Copy

ALTER TABLE "STUDENT" RENAME COLUMN "column 1" TO "column 2"

MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"STUDENT" RENAME COLUMN "column 1" TO "column 2"' at line 1

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
  • Does this answer your question? [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – P.Salmon Mar 19 '20 at 07:53

2 Answers2

0

Try this method

 ALTER TABLE "STUDENT" RENAME COLUMN "Roll" TO "Num" datatype(length);
Rahul Kr Daman
  • 387
  • 3
  • 15
0

See here for an answer to your question.

Basically: use backticks instead of quotes.

Steven Evers
  • 16,649
  • 19
  • 79
  • 126