在 SQL Server 2005 中运行 XQuery 时,我希望有一些默认可用的命名空间,这可能吗?
例如,我想做以下事情:
select * from TableWithXML
where
FieldWithXML.exist(
declare namespace nsp="http://www.example.com/exampleNamespace";
nsp:root/nsp:childnode) = 1
不必每次都重新声明命名空间,这样 SQL 就可以识别 nsp 而无需我每次都包括序言。
想法?