<small id='QlDju'></small><noframes id='QlDju'>

<i id='QlDju'><tr id='QlDju'><dt id='QlDju'><q id='QlDju'><span id='QlDju'><b id='QlDju'><form id='QlDju'><ins id='QlDju'></ins><ul id='QlDju'></ul><sub id='QlDju'></sub></form><legend id='QlDju'></legend><bdo id='QlDju'><pre id='QlDju'><center id='QlDju'></center></pre></bdo></b><th id='QlDju'></th></span></q></dt></tr></i><div id='QlDju'><tfoot id='QlDju'></tfoot><dl id='QlDju'><fieldset id='QlDju'></fieldset></dl></div>
    • <bdo id='QlDju'></bdo><ul id='QlDju'></ul>

    <legend id='QlDju'><style id='QlDju'><dir id='QlDju'><q id='QlDju'></q></dir></style></legend>

      <tfoot id='QlDju'></tfoot>

        如何从 SQL Server 获取 ROOT 节点名称

        时间:2023-06-07
        1. <legend id='kU4oZ'><style id='kU4oZ'><dir id='kU4oZ'><q id='kU4oZ'></q></dir></style></legend>

            <tfoot id='kU4oZ'></tfoot>
              <tbody id='kU4oZ'></tbody>

            • <small id='kU4oZ'></small><noframes id='kU4oZ'>

                • <bdo id='kU4oZ'></bdo><ul id='kU4oZ'></ul>
                • <i id='kU4oZ'><tr id='kU4oZ'><dt id='kU4oZ'><q id='kU4oZ'><span id='kU4oZ'><b id='kU4oZ'><form id='kU4oZ'><ins id='kU4oZ'></ins><ul id='kU4oZ'></ul><sub id='kU4oZ'></sub></form><legend id='kU4oZ'></legend><bdo id='kU4oZ'><pre id='kU4oZ'><center id='kU4oZ'></center></pre></bdo></b><th id='kU4oZ'></th></span></q></dt></tr></i><div id='kU4oZ'><tfoot id='kU4oZ'></tfoot><dl id='kU4oZ'><fieldset id='kU4oZ'></fieldset></dl></div>
                  本文介绍了如何从 SQL Server 获取 ROOT 节点名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我有一个表,其中 IDintegerXMLXML 数据类型.

                  I have a table where ID is integer and XML is XML data type.

                  ID   XML
                  ----------------------
                  1    <Form1>...</Form1>
                  2    <Form1>...</Form1>
                  3    <Form2>...</Form2>
                  4    <Form3>...</Form3>
                  

                  如何得到下面的结果?

                  ID   XML
                  -------------
                  1    Form1
                  2    Form1
                  3    Form2
                  4    Form3
                  

                  推荐答案

                  使用local-name()函数

                   select ID, XML.value('local-name(/*[1])','varchar(100)')
                   from yourtable
                  

                  这篇关于如何从 SQL Server 获取 ROOT 节点名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:XML 解析 - SQL Server 下一篇:查询具有 xmlns 节点属性的 XML 数据类型

                  相关文章

                  最新文章

                • <legend id='ibeUX'><style id='ibeUX'><dir id='ibeUX'><q id='ibeUX'></q></dir></style></legend>

                  <small id='ibeUX'></small><noframes id='ibeUX'>

                    <bdo id='ibeUX'></bdo><ul id='ibeUX'></ul>
                • <tfoot id='ibeUX'></tfoot>
                    <i id='ibeUX'><tr id='ibeUX'><dt id='ibeUX'><q id='ibeUX'><span id='ibeUX'><b id='ibeUX'><form id='ibeUX'><ins id='ibeUX'></ins><ul id='ibeUX'></ul><sub id='ibeUX'></sub></form><legend id='ibeUX'></legend><bdo id='ibeUX'><pre id='ibeUX'><center id='ibeUX'></center></pre></bdo></b><th id='ibeUX'></th></span></q></dt></tr></i><div id='ibeUX'><tfoot id='ibeUX'></tfoot><dl id='ibeUX'><fieldset id='ibeUX'></fieldset></dl></div>