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

Commit 53a86fd

Browse files
author
MightyPen
committed
Fix Issue 5281, http for schema.
1 parent 7744ef1 commit 53a86fd

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

docs/relational-databases/xml/columns-without-a-name.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Columns without a Name | Microsoft Docs"
33
description: Learn how SQL Server treats columns without a name when generating XML.
44
ms.custom: ""
5-
ms.date: "03/01/2017"
5+
ms.date: "08/01/2020"
66
ms.prod: sql
77
ms.prod_service: "database-engine"
88
ms.reviewer: ""
@@ -11,32 +11,33 @@ ms.topic: conceptual
1111
helpviewer_keywords:
1212
- "names [SQL Server], columns without"
1313
ms.assetid: 440de44e-3a56-4531-b4e4-1533ca933cac
14-
author: MightyPen
15-
ms.author: genemi
14+
author: rothja
15+
ms.author: jroth
1616
---
1717
# Columns without a Name
1818
[!INCLUDE [SQL Server Azure SQL Database](../../includes/applies-to-version/sql-asdb.md)]
1919
Any column without a name will be inlined. For example, computed columns or nested scalar queries that do not specify column alias will generate columns without any name. If the column is of **xml** type, the content of that data type instance is inserted. Otherwise, the column content is inserted as a text node.
2020

21-
```
21+
```sql
2222
SELECT 2+2
2323
FOR XML PATH
2424
```
2525

26-
Produce this XML. By default, for each row in the rowset, a <`row`> element is generated in the resulting XML. This is the same as RAW mode.
26+
Produce this XML. By default, for each row in the rowset, a `<row>` element is generated in the resulting XML. This is the same as RAW mode.
2727

2828
`<row>4</row>`
2929

3030
The following query returns a three-column rowset. The third column without a name has XML data. The PATH mode inserts an instance of the xml type.
3131

32-
```
32+
```sql
3333
USE AdventureWorks2012;
3434
GO
3535
SELECT ProductModelID,
3636
Name,
37-
Instructions.query('declare namespace MI="https://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions";
38-
/MI:root/MI:Location
39-
')
37+
Instructions.query(
38+
'declare namespace MI="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions";
39+
/MI:root/MI:Location
40+
')
4041
FROM Production.ProductModel
4142
WHERE ProductModelID=7
4243
FOR XML PATH ;

0 commit comments

Comments
 (0)