Skip to content

Commit af41e42

Browse files
authored
added default keyword
1 parent a350751 commit af41e42

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

docs/t-sql/statements/copy-into-transact-sql.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: COPY INTO (Transact-SQL)
33
titleSuffix: (Azure Synapse Analytics) - SQL Server
44
description: Use the COPY statement in Azure Synapse Analytics for loading from external storage accounts.
5-
ms.date: 09/25/2020
5+
ms.date: 05/20/2021
66
ms.prod: sql
77
ms.prod_service: "database-engine, sql-database, synapse-analytics"
88
ms.reviewer: jrasnick
@@ -15,8 +15,8 @@ f1_keywords:
1515
- "LOAD"
1616
dev_langs:
1717
- "TSQL"
18-
author: kevinvngo
19-
ms.author: kevin
18+
author: anumjs
19+
ms.author: anumjs
2020
monikerRange: "=azure-sqldw-latest"
2121
---
2222
# COPY (Transact-SQL)
@@ -77,13 +77,14 @@ Is the name of the table to COPY data into. The target table can be a temporary
7777
*(column_list)*
7878
Is an optional list of one or more columns used to map source data fields to target table columns for loading data. *column_list* must be enclosed in parentheses and delimited by commas. The column list is of the following format:
7979

80-
[(Column_name [Default_value] [Field_number] [,...n])]
80+
[(Column_name [default Default_value] [Field_number] [,...n])]
8181

8282
- *Column_name* - the name of the column in the target table.
83-
- *Default_value* - the default value that will replace any NULL value in the input file. Default value applies to all file formats. COPY will attempt to load NULL from the input file when a column is omitted from the column list or when there is an empty input file field.
83+
- *Default_value* - the default value that will replace any NULL value in the input file. Default value applies to all file formats. COPY will attempt to load NULL from the input file when a column is omitted from the column list or when there is an empty input file field. Default value is preceded by the keyword 'default'
8484
- *Field_number* - the input file field number that will be mapped to the target column name.
8585
- The field indexing starts at 1.
8686

87+
8788
When a column list is not specified, COPY will map columns based on the source and target ordinality: Input field 1 will go to target column 1, field 2 will go to column 2, etc.
8889

8990
*External locations(s)*</br>

0 commit comments

Comments
 (0)