0

How to alter database name from test to test1?

Your Common Sense
  • 154,967
  • 38
  • 205
  • 325
GJ BD
  • 19
  • 2

1 Answers1

0

If its a SQL Server 2000 or 2005 database use the following T-SQL: command to make the database name change.

EXEC sp_renamedb 'oldName', 'newName'

The new command that should be used for SQL Serer 2005 and beyond is:

ALTER DATABASE oldName MODIFY NAME = newName

For Oracle database see here

Riain McAtamney
  • 6,192
  • 17
  • 48
  • 61