2012年2月11日星期六

Basics of T-Sql and XQuery

Pl let me know
1)the different between those two.
2)when to use?
and
3)anyone is Microsoft specific?

4) for and open xml can be used only in xquery?

1) XQuery is for querying XML fragments and T-SQL is a language that augments SQL for querying relational data.

2) You should use SQL for querying relation data and XQuery for querying XML within your applcation.

3) T-SQL has constructs that are SQL Server specific (i.e declaring a variable, while loops). The SQL part of the language has various Microsoft specific stuff, but we do try to align to the standard.

4) FOR XML and OPENXML are not part of XQuery. These were SQL Server 2000 technologies (still in 2005) used for composing and shredding xml to and from relational data.

Please see Books Online for more information: http://msdn2.microsoft.com/en-us/library/ms187875.aspx.

Regards,

Galex

没有评论:

发表评论