Yep, there is going to be another post about this topic because there are different ways to store XML in Oracle database. That’s why its numbered. First way to do it stroing xml in CLOB XMLType. Oracle provides this facility with 9iR1 and further versions. Before doing that, we should create a table that can store xml.
create table MYTABLE( id number , myxml XMLType) XmlType myxml STORE AS CLOB;
And now we created our table, to store the xml our query should be like this:
insert into MYTABLE(id, myxml) values ( 1, XMLType('<department> <student> <id>1231123</id> <name>Timur Aykut YILDIRIM</name> </student> </department>'));