Create a table with XML column

Hi Experts,
I am trying to create a simple table with 2 columns as below.  Is there a simple way to create the table and insert data to it?  Specially to Resume column being XML data type, I had hard time understanding it?  Thank you in advance.

Column   Data Type
-----------   --------------
Id             Integer
Resume   XML
RadhaKrishnaKiJayaAsked:
Who is Participating?
 
deviprasadgConnect With a Mentor Commented:
CREATE TABLE RESUMES(
ID INT,
Resume   XML)

GO

INSERT INTO RESUMES
SELECT 1,'<RESUME><NAME>NAME</NAME><ADDRESS>ADDRESS DETAILS</ADDRESS></RESUME>'

--OR

INSERT INTO RESUMES
SELECT 2,CAST('<RESUME><NAME>NAME2</NAME><ADDRESS>ADDRESS2 DETAILS</ADDRESS></RESUME>' AS XML)

GO

SELECT * fROM RESUMES

GO

Open in new window

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Can you Please clarify what issue you run into?
The xml data type is nothing else than VARCHAR + some integrity checks + some xml functions you can apply on the columns...
0
 
RadhaKrishnaKiJayaAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.