tailieunhanh - The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P105
The Real MTCS SQL Server 2008 Exam 70/432 Prep Kit- P105: Congratulations on your journey to become certified in SQL Server 2008. This book will help prepare you for your exam and give you a practical view of working with SQL Server 2008. | 502 Chapter 11 SQL Server XML Support With a slight variation of this query we will now search on the LastName. SELECT pk employee FROM tbl_xml WHERE employee person name LastName . nLiddlen 1 Table Exist Method Argument Exist Arguments Description XQuery Is an XQuery expression a string literal. The last method for querying XML documents in an XML data type is the nodes method. The nodes method will return a rowset for each row in the query. This is helpful when you want to make your XML data type into a relational format. Every XML document has a node and in the XML data type this is the document node. The document node is the node at the top of every XML data type. In Figure you query the sample XML document shown in Figure to return rows for each person in your employee node. Table describes the nodes method argument. Figure Sample Node Method SELECT . FROM tbl_xml CROSS APPLY employee person as T2 employee Table Nodes Method Argument Nodes Argument Description XQuery Is a string literal an XQuery expression. If the query expression constructs nodes these constructed nodes are exposed in the resulting rowset. If the query expression results in an empty sequence the rowset will be empty. If the query expression statically results in a sequence that contains atomic values instead of nodes a static error is raised. Table Column Is the table name and the column name for the resulting rowset. SQL Server XML Support Chapter 11 503 SQL Server 2008 provides extensions that allow XQuery to modify data using the modify method. The modify method includes three DML statements INSERT DELETE and REPLACE VALUE OF see Table . Table Modify Method Argument DML Description insert Inserts one or more nodes as a child. INSERT allows you to insert XML before or after and existing XML node. You can also insert attributes. delete DELETE XML elements or attributes from your XML document replace .
đang nạp các trang xem trước