Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 072ba4b

Browse files
authored
Merge pull request #17006 from Kat-Campise/tsql_renaming6
tsql renaming set 6
2 parents f86d351 + 719f977 commit 072ba4b

20 files changed

Lines changed: 65 additions & 65 deletions

docs/t-sql/statements/create-schema-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ CREATE SCHEMA schema_name_clause [ <schema_element> [ ...n ] ]
5555
```
5656

5757
```syntaxsql
58-
-- Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse
58+
-- Syntax for Azure Synapse Analytics and Parallel Data Warehouse
5959
6060
CREATE SCHEMA schema_name [ AUTHORIZATION owner_name ] [;]
6161
```

docs/t-sql/statements/create-statistics-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ ON { table_or_indexed_view_name } ( column [ ,...n ] )
8484
```
8585

8686
```syntaxsql
87-
-- Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse
87+
-- Syntax for Azure Synapse Analytics and Parallel Data Warehouse
8888
8989
CREATE STATISTICS statistics_name
9090
ON { database_name.schema_name.table_name | schema_name.table_name | table_name }

docs/t-sql/statements/create-table-as-select-azure-sql-data-warehouse.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "CREATE TABLE AS SELECT (Azure SQL Data Warehouse)"
3-
title: "CREATE TABLE AS SELECT (Azure SQL Data Warehouse) | Microsoft Docs"
2+
description: "CREATE TABLE AS SELECT (Azure Synapse Analytics)"
3+
title: "CREATE TABLE AS SELECT (Azure Synapse Analytics) | Microsoft Docs"
44
ms.custom: ""
55
ms.date: "10/07/2016"
66
ms.service: sql-data-warehouse
@@ -13,7 +13,7 @@ author: julieMSFT
1313
ms.author: jrasnick
1414
monikerRange: ">= aps-pdw-2016 || = azure-sqldw-latest || = sqlallproducts-allversions"
1515
---
16-
# CREATE TABLE AS SELECT (Azure SQL Data Warehouse)
16+
# CREATE TABLE AS SELECT (Azure Synapse Analytics)
1717
[!INCLUDE[applies-to-version/asa-pdw](../../includes/applies-to-version/asa-pdw.md)]
1818

1919
CREATE TABLE AS SELECT (CTAS) is one of the most important T-SQL features available. It is a fully parallelized operation that creates a new table based on the output of a SELECT statement. CTAS is the simplest and fastest way to create a copy of a table.
@@ -26,7 +26,7 @@ CREATE TABLE AS SELECT (CTAS) is one of the most important T-SQL features availa
2626
- Query or import external data.
2727

2828
> [!NOTE]
29-
> Since CTAS adds to the capabilities of creating a table, this topic tries not to repeat the CREATE TABLE topic. Instead, it describes the differences between the CTAS and CREATE TABLE statements. For the CREATE TABLE details, see [CREATE TABLE (Azure SQL Data Warehouse)](https://msdn.microsoft.com/library/mt203953/) statement.
29+
> Since CTAS adds to the capabilities of creating a table, this topic tries not to repeat the CREATE TABLE topic. Instead, it describes the differences between the CTAS and CREATE TABLE statements. For the CREATE TABLE details, see [CREATE TABLE (Azure Synapse Analytics)](https://msdn.microsoft.com/library/mt203953/) statement.
3030
3131
![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3232

@@ -54,7 +54,7 @@ CREATE TABLE { database_name.schema_name.table_name | schema_name.table_name | t
5454
5555
<table_option> ::=
5656
{
57-
CLUSTERED COLUMNSTORE INDEX --default for SQL Data Warehouse
57+
CLUSTERED COLUMNSTORE INDEX --default for Synapse Analytics
5858
| CLUSTERED COLUMNSTORE INDEX ORDER (column[,...n])
5959
| HEAP --default for Parallel Data Warehouse
6060
| CLUSTERED INDEX ( { index_column_name [ ASC | DESC ] } [ ,...n ] ) --default is ASC
@@ -132,7 +132,7 @@ For details, see [General Remarks](https://msdn.microsoft.com/library/mt203953/#
132132

133133
## Limitations and Restrictions
134134

135-
An ordered clustered columnstore index can be created on columns of any data types supported in Azure SQL Data Warehouse except for string columns.
135+
An ordered clustered columnstore index can be created on columns of any data types supported in [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] except for string columns.
136136

137137
[SET ROWCOUNT &#40;Transact-SQL&#41;](../../t-sql/statements/set-rowcount-transact-sql.md) has no effect on CTAS. To achieve a similar behavior, use [TOP &#40;Transact-SQL&#41;](../../t-sql/queries/top-transact-sql.md).
138138

@@ -161,7 +161,7 @@ To avoid data movement in subsequent queries, you can specify `REPLICATE` at the
161161
<a name="ctas-copy-table-bk"></a>
162162

163163
### A. Use CTAS to copy a table
164-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
164+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
165165

166166
Perhaps one of the most common uses of `CTAS` is creating a copy of a table so that you can change the DDL. If for example you originally created your table as `ROUND_ROBIN` and now want change it to a table distributed on a column, `CTAS` is how you would change the distribution column. `CTAS` can also be used to change partitioning, indexing, or column types.
167167

@@ -233,7 +233,7 @@ DROP TABLE FactInternetSales_old;
233233
<a name="ctas-change-column-attributes-bk"></a>
234234

235235
### B. Use CTAS to change column attributes
236-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
236+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
237237

238238
This example uses CTAS to change data types, nullability, and collation for several columns in the DimCustomer2 table.
239239

@@ -294,13 +294,13 @@ DROP TABLE DimCustomer2_old;
294294
<a name="ctas-change-distribution-method-bk"></a>
295295

296296
### C. Use CTAS to change the distribution method for a table
297-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
297+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
298298

299299
This simple example shows how to change the distribution method for a table. To show the mechanics of how to do this, it changes a hash-distributed table to round-robin and then changes the round-robin table back to hash distributed. The final table matches the original table.
300300

301301
In most cases you won't need to change a hash-distributed table to a round-robin table. More often, you might need to change a round-robin table to a hash distributed table. For example, you might initially load a new table as round-robin and then later move it to a hash-distributed table to get better join performance.
302302

303-
This example uses the AdventureWorksDW sample database. To load the SQL Data Warehouse version, see [Load sample data into SQL Data Warehouse](https://azure.microsoft.com/documentation/articles/sql-data-warehouse-load-sample-databases/)
303+
This example uses the AdventureWorksDW sample database. To load the [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] version, see [Load sample data into [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)]](https://azure.microsoft.com/documentation/articles/sql-data-warehouse-load-sample-databases/)
304304

305305
```sql
306306
-- DimSalesTerritory is hash-distributed.
@@ -344,7 +344,7 @@ DROP TABLE [dbo].[DimSalesTerritory_old];
344344
<a name="ctas-change-to-replicated-bk"></a>
345345

346346
### D. Use CTAS to convert a table to a replicated table
347-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
347+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
348348

349349
This example applies for converting round-robin or hash-distributed tables to a replicated table. This particular example takes the previous method of changing the distribution type one step further. Since DimSalesTerritory is a dimension and likely a smaller table, you can choose to re-create the table as replicated to avoid data movement when joining to other tables.
350350

@@ -368,7 +368,7 @@ DROP TABLE [dbo].[DimSalesTerritory_old];
368368
```
369369

370370
### E. Use CTAS to create a table with fewer columns
371-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
371+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
372372

373373
The following example creates a round-robin distributed table named `myTable (c, ln)`. The new table only has two columns. It uses the column aliases in the SELECT statement for the names of the columns.
374374

@@ -390,7 +390,7 @@ AS SELECT CustomerKey AS c, LastName AS ln
390390
<a name="ctas-query-hint-bk"></a>
391391

392392
### F. Use a Query Hint with CREATE TABLE AS SELECT (CTAS)
393-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
393+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
394394

395395
This query shows the basic syntax for using a query join hint with the CTAS statement. After the query is submitted, [!INCLUDE[ssSDW](../../includes/sssdw-md.md)] applies the hash join strategy when it generates the query plan for each individual distribution. For more information on the hash join query hint, see [OPTION Clause &#40;Transact-SQL&#41;](../../t-sql/queries/option-clause-transact-sql.md).
396396

@@ -413,7 +413,7 @@ OPTION ( HASH JOIN );
413413
<a name="ctas-azure-blob-storage-bk"></a>
414414

415415
### G. Use CTAS to import data from Azure Blob storage
416-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
416+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
417417

418418
To import data from an external table, simply use CREATE TABLE AS SELECT to select from the external table. The syntax to select data from an external table into [!INCLUDE[ssSDW](../../includes/sssdw-md.md)] is the same as the syntax for selecting data from a regular table.
419419

@@ -434,7 +434,7 @@ WITH (
434434
;
435435

436436
--Use CREATE TABLE AS SELECT to import the Azure blob storage data into a new
437-
--SQL Data Warehouse table called ClickStreamData
437+
--Synapse Analytics table called ClickStreamData
438438
CREATE TABLE ClickStreamData
439439
WITH
440440
(
@@ -495,7 +495,7 @@ Use CTAS to work around some unsupported features. Besides being able to run you
495495
<a name="ctas-replace-select-into-bk"></a>
496496

497497
### I. Use CTAS instead of SELECT..INTO
498-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
498+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
499499

500500
SQL Server code typically uses SELECT..INTO to populate a table with the results of a SELECT statement. This is an example of a SQL Server SELECT..INTO statement.
501501

@@ -505,7 +505,7 @@ INTO #tmp_fct
505505
FROM [dbo].[FactInternetSales]
506506
```
507507

508-
This syntax is not supported in SQL Data Warehouse and Parallel Data Warehouse. This example shows how to rewrite the previous SELECT..INTO statement as a CTAS statement. You can choose any of the DISTRIBUTION options described in the CTAS syntax. This example uses the ROUND_ROBIN distribution method.
508+
This syntax is not supported in [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and Parallel Data Warehouse. This example shows how to rewrite the previous SELECT..INTO statement as a CTAS statement. You can choose any of the DISTRIBUTION options described in the CTAS syntax. This example uses the ROUND_ROBIN distribution method.
509509

510510
```sql
511511
CREATE TABLE #tmp_fct
@@ -522,7 +522,7 @@ FROM [dbo].[FactInternetSales]
522522
<a name="ctas-replace-implicit-joins-bk"></a>
523523

524524
### J. Use CTAS and implicit joins to replace ANSI joins in the `FROM` clause of an `UPDATE` statement
525-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
525+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
526526

527527
You may find you have a complex update that joins more than two tables together using ANSI joining syntax to perform the UPDATE or DELETE.
528528

@@ -566,7 +566,7 @@ AND [acs].[CalendarYear] = [fis].[CalendarYear]
566566
;
567567
```
568568

569-
Since SQL Data Warehouse does not support ANSI joins in the `FROM` clause of an `UPDATE` statement, you cannot use this SQL Server code over without changing it slightly.
569+
Since [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] does not support ANSI joins in the `FROM` clause of an `UPDATE` statement, you cannot use this SQL Server code over without changing it slightly.
570570

571571
You can use a combination of a `CTAS` and an implicit join to replace this code:
572572

@@ -605,9 +605,9 @@ DROP TABLE CTAS_acs
605605
<a name="ctas-replace-ansi-joins-bk"></a>
606606

607607
### K. Use CTAS to specify which data to keep instead of using ANSI joins in the FROM clause of a DELETE statement
608-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
608+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
609609

610-
Sometimes the best approach for deleting data is to use `CTAS`. Rather than deleting the data simply select the data you want to keep. This especially true for `DELETE` statements that use ansi joining syntax since SQL Data Warehouse does not support ANSI joins in the `FROM` clause of a `DELETE` statement.
610+
Sometimes the best approach for deleting data is to use `CTAS`. Rather than deleting the data simply select the data you want to keep. This especially true for `DELETE` statements that use ansi joining syntax since [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] does not support ANSI joins in the `FROM` clause of a `DELETE` statement.
611611

612612
An example of a converted DELETE statement is available below:
613613

@@ -633,7 +633,7 @@ RENAME OBJECT dbo.DimProduct_upsert TO DimProduct;
633633
<a name="ctas-simplify-merge-bk"></a>
634634

635635
### L. Use CTAS to simplify merge statements
636-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
636+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
637637

638638
Merge statements can be replaced, at least in part, by using `CTAS`. You can consolidate the `INSERT` and the `UPDATE` into a single statement. Any deleted records would need to be closed off in a second statement.
639639

@@ -672,9 +672,9 @@ RENAME OBJECT dbo.[DimProduct_upsert] TO [DimProduct];
672672
<a name="ctas-data-type-and-nullability-bk"></a>
673673

674674
### M. Explicitly state data type and nullability of output
675-
Applies to: Azure SQL Data Warehouse and Parallel Data Warehouse
675+
Applies to: [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
676676

677-
When migrating SQL Server code to SQL Data Warehouse, you might find you run across this type of coding pattern:
677+
When migrating SQL Server code to [!INCLUDE[ssSDW](../../includes/sssdwfull-md.md)], you might find you run across this type of coding pattern:
678678

679679
```sql
680680
DECLARE @d DECIMAL(7,2) = 85.455
@@ -838,7 +838,7 @@ OPTION (MAXDOP 1);
838838
[CREATE EXTERNAL FILE FORMAT &#40;Transact-SQL&#41;](../../t-sql/statements/create-external-file-format-transact-sql.md)
839839
[CREATE EXTERNAL TABLE &#40;Transact-SQL&#41;](../../t-sql/statements/create-external-table-transact-sql.md)
840840
[CREATE EXTERNAL TABLE AS SELECT &#40;Transact-SQL&#41;](../../t-sql/statements/create-external-table-as-select-transact-sql.md)
841-
[CREATE TABLE &#40;Azure SQL Data Warehouse&#41;](../../t-sql/statements/create-table-azure-sql-data-warehouse.md)
841+
[CREATE TABLE &#40;Azure Synapse Analytics&#41;](../../t-sql/statements/create-table-azure-sql-data-warehouse.md)
842842
[DROP TABLE &#40;Transact-SQL&#41;](../../t-sql/statements/drop-table-transact-sql.md)
843843
[DROP EXTERNAL TABLE &#40;Transact-SQL&#41;](../../t-sql/statements/drop-external-table-transact-sql.md)
844844
[ALTER TABLE &#40;Transact-SQL&#41;](../../t-sql/statements/alter-table-transact-sql.md)

0 commit comments

Comments
 (0)