title: SQL Server XML Declare Namespace
body: <p>I would like to have a few namespaces available by default when running an XQuery in SQL Server 2005, is this possible?</p>
  
  <p>For example, I would like to do the following:</p>
  
  <pre><code>select * from TableWithXML
  where
  FieldWithXML.exist(
  declare namespace nsp="http://www.example.com/exampleNamespace";
  nsp:root/nsp:childnode) = 1
  </code></pre>
  
  <p>Without having to redeclare the namespace each time, so that SQL will recognize nsp without me including the prolog each time.</p>
  
  <p>Thoughts?</p>