About 10,000 results
Open links in new tab
  1. SQL Query to Rename Database - GeeksforGeeks

    Nov 27, 2024 · To rename a database in SQL, you’ll need to use the ALTER DATABASE command. The syntax varies slightly between different SQL platforms, but the core functionality remains the same. The ALTER DATABASE statement allows you to modify the properties of a database, including its name.

  2. Rename a database - SQL Server | Microsoft Learn

    Jul 26, 2024 · This article describes how to rename a user-defined database in SQL Server, Azure SQL Database, or Azure SQL Managed Instance, by using SQL Server Management Studio (SSMS) or Transact-SQL (T-SQL). The name of the database can include any characters that follow the rules for identifiers.

  3. How to rename a SQL Server database - MSSQLTips.com

    Jan 2, 2025 · Option 1 – Rename SQL Server Database using T-SQL. This command works for SQL Server 2005, 2008, 2008R2, 2012, 2014, 2016, 2017, 2019 and 2022: ALTER DATABASE [Test] MODIFY NAME = [Test2] If you are using SQL Server 2000 you can use the T-SQL command below to make the database name change.

  4. How to Use the SQL ALTER DATABASE Statement to Modify

    The SQL ALTER DATABASE is an essential statement to modify the properties of an existing database in a Relational Database Management System (RDBMS). This tutorial will guide you on how to use this statement to rename a database, change its composition, or modify file properties.

  5. Steps to Rename a SQL Server Database - MSSQLTips.com

    Jan 3, 2019 · In this tip, you will see the steps which you need to follow to rename a SQL Server Database using the ALTER DATABASE command. Creating a Sample Database Namely CoreDB. Let’s first create a new database named CoreDB using the T-SQL below. Adjust the file locations to match your needs.

  6. How to Rename a SQL Server Database - TecAdmin

    6 days ago · The first option will use SQL query to rename a database, the second will use a stored procedure and the third option will use SQL Server Management Studio (SSMS) to rename a database. Use one of the below options’s to rename a SQL server database: 1. Rename SQL Database with Query. Use ALTER DATABASE query to rename a database in SQL Server.

  7. SQL Rename Database - Online Tutorials Library

    The ALTER DATABASE...MODIFY statement in SQL is used to rename the name of an existing database name in SQL Database Server. Please note that this command does not work in MySQL database. Syntax

  8. How To Rename SQL Server Database » SQLGeeksPro

    GO ALTER DATABASE [CurrentDatabaseName] MODIFY NAME = [NewDatabaseName] -- Change the CurrentDatabaseName and NewDatabaseName as required. For Example: This command works for SQL Server 2005, 2008, 2008R2, 2012, 2014, 2016, 2017, 2019 and 2022. Alternatively you can use sp_renamedb as well.

  9. Rename database - sqlforgeeks.com

    To rename an existing SQL database, use the ALTER DATABASE statement followed by the RENAME TO clause. How do I rename a database filename in SQL Server? In SQL Server, you can rename a database filename by detaching the database, renaming the physical files, and then reattaching it with the new file names.

  10. SQL RENAME Database - Tpoint Tech - Java

    Aug 29, 2024 · This syntax is used when we want to change the name of the database in MySQL. Examples of Rename Database in SQL. In this article, we have taken the following two examples which will help you how to run and perform the Rename Database query in SQL: Example 1: Suppose we want to rename the Student Database.

  11. Some results have been removed
Refresh