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 Answer 1

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

6
  • You mean to say that in ubuntu we cannot rename any database or table for this we have to copy the databases. May 23, 2019 at 9:07
  • How that link is helpful in my problem?? May 23, 2019 at 9:10
  • It tells you how to rename a database in MySQL. May 23, 2019 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 . May 24, 2019 at 10:24
  • But Microsoft SQL Workbench does not support MySQL in the first place... May 24, 2019 at 11:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .