Skip to content

Commit 15ac628

Browse files
authored
Merge pull request #22163 from realAngryAnalytics/20220520-rename-note
20220520 1209 added clarity to the Note about not supported in synaps…
2 parents 914d7c8 + ab29c58 commit 15ac628

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

docs/t-sql/statements/rename-transact-sql.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Renames a user-created table in [!INCLUDE[ssSDW](../../includes/sssdw-md.md)]. R
2323
2424

2525
> [!NOTE]
26-
> Renaming a dedicated SQL pool in Azure Synapse Analytics is not currently supported.
26+
> Renaming standalone dedicated SQL pools (formerly SQL DW) is supported. Renaming a dedicated SQL pool in Azure Synapse Analytics isn't currently supported.
27+
2728

2829
## Syntax
2930

@@ -106,9 +107,9 @@ You can't rename a column that is used for the table's distribution. You also ca
106107

107108
When renaming a database, all views that use the former database name will become invalid. This behavior applies to views both inside and outside the database. For example, if the Sales database is renamed, a view that contains `SELECT * FROM Sales.dbo.table1` will become invalid. To resolve this issue, you can either avoid using three-part names in views, or update the views to reference the new database name.
108109

109-
When renaming a table, views are not updated to reference the new table name. Each view, inside or outside of the database, that references the former table name will become invalid. To resolve this issue, you can update each view to reference the new table name.
110+
When renaming a table, views aren't updated to reference the new table name. Each view, inside or outside of the database, that references the former table name will become invalid. To resolve this issue, you can update each view to reference the new table name.
110111

111-
When renaming a column, views are not updated to reference the new column name. Views will keep showing the old column name until an alter view is performed. In certain cases, views can become invalid needing a drop and recreate.
112+
When renaming a column, views aren't updated to reference the new column name. Views will keep showing the old column name until an alter view is performed. In certain cases, views can become invalid needing a drop and recreate.
112113

113114
## Locking
114115

@@ -128,7 +129,7 @@ RENAME DATABASE AdWorks to AdWorks2;
128129

129130
```
130131

131-
When renaming a table, all objects and properties associated with the table are updated to reference the new table name. For example, table definitions, indexes, constraints, and permissions are updated. Views are not updated.
132+
When renaming a table, all objects and properties associated with the table are updated to reference the new table name. For example, table definitions, indexes, constraints, and permissions are updated. Views aren't updated.
132133

133134
### B. Rename a table
134135

@@ -143,7 +144,7 @@ RENAME OBJECT Customer TO Customer1;
143144
RENAME OBJECT mydb.dbo.Customer TO Customer1;
144145
```
145146

146-
When renaming a table, all objects and properties associated with the table are updated to reference the new table name. For example, table definitions, indexes, constraints, and permissions are updated. Views are not updated.
147+
When renaming a table, all objects and properties associated with the table are updated to reference the new table name. For example, table definitions, indexes, constraints, and permissions are updated. Views aren't updated.
147148

148149
### C. Move a table to a different schema
149150

@@ -159,7 +160,7 @@ ALTER SCHEMA dbo TRANSFER OBJECT::product.item;
159160

160161
**APPLIES TO:** [!INCLUDE[ssSDW](../../includes/sssdw-md.md)], [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
161162

162-
You can't rename a table while it is in use. A rename of a table requires an exclusive lock on the table. If the table is in use, you may need to terminate the session using the table. To terminate a session, you can use the KILL command. Use KILL cautiously since when a session is terminated any uncommitted work will be rolled back. Sessions in [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] are prefixed by 'SID'. You will need to include 'SID' and the session number when invoking the KILL command. This example views a list of active or idle sessions and then terminates session 'SID1234'.
163+
You can't rename a table while it is in use. A rename of a table requires an exclusive lock on the table. If the table is in use, you may need to terminate the session using the table. To terminate a session, you can use the KILL command. Use KILL cautiously since when a session is terminated any uncommitted work will be rolled back. Sessions in [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] are prefixed by 'SID'. You'll need to include 'SID' and the session number when invoking the KILL command. This example views a list of active or idle sessions and then terminates session 'SID1234'.
163164

164165
```sql
165166
-- View a list of the current sessions

0 commit comments

Comments
 (0)