About 5,460,000 results
Open links in new tab
  1. Introduction to the XML data type in SQL Server - SQL Shack

    Jan 30, 2020 · The XML data type is a very common data type that is used to store unstructured or heterogeneous data in SQL Server. In this article, we will discuss the use of the XML data type along with its benefits, disadvantages, and limitations within various use cases.

  2. xml data type and columns (SQL Server) - SQL Server

    Feb 28, 2023 · Examples include relational data exposed as XML for data exchange and Web services, and XML data with fixed schema. For more information. Example: Model data using an annotated XML schema (AXSD)

  3. query () Method (xml Data Type) - SQL Server | Microsoft Learn

    Sep 3, 2024 · Using the query () method against an xml type variable. The following example declares a variable @myDoc of xml type and assigns an XML instance to it. The query () method is then used to specify an XQuery against the document. The query retrieves the <Features> child element of the <ProductDescription> element:

  4. How can I query a value in SQL Server XML column

    Apr 27, 2012 · These pages will show you more about how to query XML in T-SQL: Querying XML fields using t-sql. Flattening XML Data in SQL Server. EDIT. After playing with it a little bit more, I ended up with this amazing query that uses CROSS APPLY. This one will search every row (role) for the value you put in your like expression...

  5. Working with XML Data in SQL Server - SQL Shack

    Oct 11, 2019 · In this article, we will see how we can work with XML in SQL Server. We will see how to convert tables in SQL into XML, how to load XML documents into SQL Server and how to create SQL tables from XML documents. Let’s first generate some dummy data. We will use this data to create XML documents. Execute the following script:

  6. Create XML data type variables and columns - SQL Server

    Feb 28, 2023 · As with other built-in types, you can use the xml data type as a column type when you create a table as a variable type, a parameter type, a function-return type, or in CAST and CONVERT. To create an xml type column as part of a table, use a CREATE TABLE statement, as shown in the following example:

  7. XML Data Type In SQL Server - C# Corner

    SQL Server provides five XML data type methods for extracting or manipulating the XML data. extract XML fragments from an XML data type. extract a single value from an XML fragment. Determine whether an XML record exists or not. Return one if it exists. Else, return 0. Updates XML data in an XML data type.

  8. Basic SQL Server XML Querying - MSSQLTips.com

    Feb 20, 2013 · We have XML data in a SQL Server database that we want to search efficiently, but are not sure of the best way to get the results we want. We need to find specific values in certain XML nodes- this will involve finding node values that match given substrings. Check out this tip to learn more.

  9. Storing and Retrieving XML Data in T-SQL Server

    Feb 25, 2025 · In T-SQL Server, XML data can be stored in a specialized XML data type, which allows efficient handling, querying, and manipulation of XML content. Storing XML data enables the preservation of hierarchical relationships and complex structures within the database.

  10. How to query for Xml values and attributes from table in SQL Server ...

    Oct 4, 2013 · In pseudo-code, I would try something like: SqmId, Data.query('/Sqm/Metrics/Metric/@id') AS id, Data.query('/Sqm/Metrics/Metric/@type') AS type, Data.query('/Sqm/Metrics/Metric/@unit') AS unit, Data.query('/Sqm/Metrics/Metric/@sum') AS sum, Data.query('/Sqm/Metrics/Metric/@count') AS count, Data.query('/Sqm/Metrics/Metric/@minValue') AS minValue,

  11. Some results have been removed
Refresh