Groups
Groups
Sign in
Groups
Groups
comp.databases.ms-sqlserver
Conversations
About
Send feedback
Help
Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Learn more
How to add xml to a column in a Database table
5 views
Skip to first unread message
Tony
unread,
Feb 7, 2012, 7:52:09 PM
2/7/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello!
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 ?
//Tony
Erland Sommarskog
unread,
Feb 8, 2012, 3:09:11 PM
2/8/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
This works for me:
Create table MyTable (MyIntColumn int Primary KEY, MyXmlColumn xml)
insert MyTable(MyIntColumn, MyXmlColumn)
VALUES(4711, '<Nisse><Hult>Vem fan är det?</Hult></Nisse>')
--
Erland Sommarskog, SQL Server MVP,
esq...@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
0 new messages