what purpose does OPENXML clause have in sql server stored
procedure?

Answer Posted / p.rajesh

OPENXML, a Transact-SQL keyword, provides a rowset over in-
memory XML documents that is similar to a table or a view.
OPENXML allows access to XML data as though it is a
relational rowset. It does this by providing a rowset view
of the internal representation of an XML document. The
records in the rowset can be stored in database tables.

OPENXML can be used in SELECT and SELECT INTO statements
wherever rowset providers, a view, or OPENROWSET can appear
as the source. For information about the syntax of OPENXML,
see OPENXML (Transact-SQL).

To write queries against an XML document by using OPENXML,
you must first call sp_xml_preparedocument. This parses the
XML document and returns a handle to the parsed document
that is ready for consumption. The parsed document is a
document object model (DOM) tree representation of various
nodes in the XML document. The document handle is passed to
OPENXML. OPENXML then provides a rowset view of the
document, based on the parameters passed to it.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

1433


What are the new features are introduced in sql server 2012 reporting services?

105


What command would you use to add a column to a table in sql server?

745


Is there any difference between primary key and unique with the not null condition?

523


what is a check constraint?

635






What command do we use to rename a db, a table and a column?

497


What are clustered and non-clustered index?

545


What is normalization? Explain its different types?

597


How to get a list of all tables with "sys.tables" view in ms sql server?

547


What is transact-sql ddl trigger?

628


Explain what are partitioned views and distributed partitioned views?

579


What is tempdb in sql server?

509


Can the “if update (colname)” statement be used in a delete trigger?

552


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2111


What is join query?

496