Skip to Content
XQuery from the Experts: A Guide to the W3C XML Query Language
book

XQuery from the Experts: A Guide to the W3C XML Query Language

by Howard Katz - Editor, Don Chamberlin, Denise Draper, Mary Fernández, Michael Kay, Jonathan Robie, Michael Rys, Jérôme Siméon, Jim Tivy, Philip Wadler
August 2003
Intermediate to advanced
512 pages
11h 23m
English
Addison-Wesley Professional
Content preview from XQuery from the Experts: A Guide to the W3C XML Query Language

Integrating XQuery and SQL: Querying XML Datatypes

Once the XML data is safely stored in a relational table, the easiest way to get at the data is to use SQL to query the table and retrieve the XML-typed column, as in the following example:

SELECT CustomerName, OrderForm
FROM Customers
WHERE CustomerID = 1

However, SQL per se cannot query information inside an XML datatype instance. That is where XQuery comes in. XQuery allows us to query and transform the XML data. What we need to understand now is how to integrate the two, so that we can invoke XQuery functionality from SQL, and also provide information from the relational environment to the XQuery context.

This section introduces three ways to query XML datatype instances in the context ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Querying XML

Querying XML

Jim Melton, Stephen Buxton
XQuery Kick Start

XQuery Kick Start

James McGovern, Per Bothner, Kurt Cagle, James Linn, Vaidyanathan Nagarajan

Publisher Resources

ISBN: 0321180607Purchase book