Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: How to add xml to a column in a Database table Date: Wed, 08 Feb 2012 21:09:11 +0100 Organization: Erland Sommarskog Lines: 23 Message-ID: References: <4f31c73f$0$285$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="nBFDv6s1VJQDuF1w6hpX2A"; logging-data="26153"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+V8hn1TmkQ/XUAPU5QMfIo" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:LlzEa5SlMJK+VzipP5DMo2r/D+E= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:934 Tony (johansson.andersson@telia.com) writes: > I have defined a table like this. It's just for learning. > Create table MyTable (MyIntColumn int Primary KEY, MyXmlColumn xml) > > The table is created fine but it's not possible to add any xml to the > MyXmlColumn > it's like the column is read only ? This works for me: Create table MyTable (MyIntColumn int Primary KEY, MyXmlColumn xml) insert MyTable(MyIntColumn, MyXmlColumn) VALUES(4711, 'Vem fan är det?') -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx