0

When i am writing "alter database first_data modify name = first" then it is giving the syntax error as - "ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'modify name = first' at line 1". what should i do??

1

This is a Microsoft SQL Server command; it uses very different syntax from MySQL/MariaDB.

There is no "database rename" command in MySQL, you can either move all individual tables to a fresh database or dump/reimport.

See this SO thread: https://stackoverflow.com/questions/67093/how-do-i-quickly-rename-a-mysql-database-change-schema-name

  • You mean to say that in ubuntu we cannot rename any database or table for this we have to copy the databases. – Akhand Chaurasia May 23 at 9:07
  • How that link is helpful in my problem?? – Akhand Chaurasia May 23 at 9:10
  • It tells you how to rename a database in MySQL. – grawity May 23 at 9:16
  • Thnxx but here the conclusion is that we cannot rename a database in mysql if we are using it in ubuntu but it is possible in microsoft workbench . – Akhand Chaurasia May 24 at 10:24
  • But Microsoft SQL Workbench does not support MySQL in the first place... – grawity May 24 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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