Oracle9ÖÐXML SQL Utility¼¼ÊõÖ¸µ¼(java)
¡ö ¿ª·¢Ç°ÒªÇóÅäÖÃ
¡ö Select XML¸ñʽÊý¾Ý
¡ö Insert XML¸ñʽÊý¾Ý
¡ö Updata XML¸ñʽÊý¾Ý
¡ö Delete XML¸ñʽÊý¾Ý
¿ª·¢Ç°ÒªÇóÅäÖÃ
±ØÐë°²×°Oracle¿Í»§¶Ë
°ÑClasspathÖ¸Ïò
classes111.zip
xmlparserv2.jar
xsu111.jar
xsu12.jar
Select XML¸ñʽÊý¾Ý
ÓÉÓÚÁ½ÕßÖ®¼ä¾ßÓÐÏà½üµÄ²ã´Î½á¹¹Êý¾Ý¹Øϵ£¬¹ØϵÊý¾Ý¿âģʽÄÜXMLÀ´Ä£Äâ¡£¼ÙÉèÒ»¸öÊéÄ¿ÁбíµÄÊý¾Ý¿â£¬BookList±íÉèÓÐÏÂÊöÁУºBookID¡¢Title¡¢Author ¡¢Publisher¡¢Year¡¢ISBNºÍÃèÊö¡£ÏÂÃæÊÇÓ¦ÓóÌÐò¶ÔÊý¾Ý¿â½øÐеĵäÐͲéѯ£º
SELECT Title£¬Author£¬Publisher£¬Year£¬ISBN from BOOKLIST WHERE BOOKID=1234£»
Èôͨ¹ýOrale XML SQL UtilityÌá½»²éѯ£¬Êý¾Ý¿â½«·µ»ØÏÂÊö½á¹û£º
<?xml version=’’1.0’’?>
<ROWSET>
<ROW id=”1”>
<TITLE>The Difference Between God and Larry Ellison:Inside Oracle
Corporation</TITLE>
<AUTHOR>Mike Wilson<AUTHOR>
<PUBLTSHER>William Morrow and Co.</PUBLISHER>
<YEAR>1997</YEAR>
<ISBN>0688149251</ISBN>
</ROWSET>
Èç¹ûÓ¦ÓóÌÐòÖ»Ïë¼òµ¥µØ°ÑÊä³öдÈëµ½Îļþ£¬¿ÉÒÔÓÃ×Ö·û´®ÐÎʽÊä³ö¡£Èç
¹ûÖ±½ÓË͸øOracle XML½âÎöÆ÷ÓÃXSLT´¦ÀíÆ÷½øÐб任£¬¿ÉÒÔÓÃDOM¶ÔÏóÐÎʽÊä³ö¡£ÌṩDOMÊä³ö¿ÉÒÔÎÞÐè½âÎö²Ù×÷£¬·ñÔòÔÚÓ¦ÓÃXSLת»»Ö®Ç°ÐèҪʵʩ½âÎö²Ù×÷¡£
ÈçÏÂÁдúÂë¶ÎËùʾ£¬Í¨¹ý°Ñ²éѯ´«µÝ¸øoranle.xml.sql.query.Oracle XML QueryÀà½øÐвéѯÌá½»£º
import java . sql . * ;
import java . math . * ;
import Oracle . xml . sql .query . * ;
import oracle . jdbc .* ;
import oracle . jdbc . driver . * ;
public static void main (String args[ ])throws SQLException
{
string tabName = “Booklist” ;
string user = “scott/tiger” ;
DriverManager . registerDriver(new oracle . jdbc .driver .oracleDriver( )) ;
Connection conn=
DriverManager . getConnection( “jdbc:oracle:oci8”+use
Ïà¹ØÎĵµ£º
ÎÒÃǾ³£Ì¸¼°OracleµÄȨÏÞ£¬±ÈÈçConnect£¬DBA£¬resource£¬ sysdba, select any
table,
select_catelog_roleÕâÑùһЩȨÏÞ£¬ÈÃÎÒÃÇÑÛ»¨çÔÂҵģ¬ÄÇôÈçºÎÀ´Çø·ÖÕâЩÖÖÀà·±¶àµÄprivilegeÖв»ÖÁÓÚÑÛÃÔÀëÄØ£¬Õâ¸öÎÄÕ½«
»á¶ÔÄãÔÚÕâ·½ÃæµÄÁ˽âÆðµ½°ïÖú¡£
ÒÔÉÏÎÒÃÇ¿´µ½µÄÕâЩȨÏÞ£¬¶¼ÊÇ¿ÉÒÔͨ¹ýg ......
SQLÓï¾äÓÅ»¯¼¼Êõ·ÖÎö
²Ù×÷·ûÓÅ»¯
IN ²Ù×÷·û
ÓÃINд³öÀ´µÄSQLµÄÓŵãÊDZȽÏÈÝÒ×д¼°ÇåÎúÒ׶®£¬Õâ±È½ÏÊʺÏÏÖ´úÈí¼þ¿ª·¢µÄ·ç¸ñ¡£
µ«ÊÇÓÃINµÄSQLÐÔÄÜ×ÜÊDZȽϵ͵ģ¬´ÓORACLEÖ´ÐеIJ½ÖèÀ´·ÖÎöÓÃINµÄSQLÓë²»ÓÃINµÄSQLÓÐÒÔÏÂÇø±ð£º
¡¡¡¡¡¡ORACLEÊÔͼ½«Æäת»»³É¶à¸ö±íµÄÁ¬½Ó£¬Èç¹ûת»»²»³É¹¦ÔòÏÈÖ´ÐÐINÀïÃæµÄ×Ó²éѯ£¬ ......
SQLÓï¾äÏÈǰдµÄʱºò£¬ºÜÈÝÒ×°ÑһЩÌØÊâµÄÓ÷¨Íü¼Ç£¬ÎÒÌØ´ËÕûÀíÁËÒ»ÏÂSQLÓï¾ä²Ù×÷¡£
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'd ......
1ÏÞÖÆ SQL Server·þÎñµÄȨÏÞ
¡¡¡¡
¡¡¡¡SQL Server 2000 ºÍ SQL Server Agent ÊÇ×÷Ϊ Windows ·þÎñÔËÐеġ£Ã¿¸ö·þÎñ±ØÐëÓëÒ»¸ö Windows ÕÊ»§Ïà¹ØÁª£¬²¢´ÓÕâ¸öÕÊ»§ÖÐÑÜÉú³ö°²È«ÐÔÉÏÏÂÎÄ¡£SQL ServerÔÊÐísa µÇ¼µÄÓû§£¨ÓÐʱҲ°üÀ¨ÆäËûÓû§£©À´·ÃÎʲÙ×÷ϵͳÌØÐÔ¡£ÕâЩ²Ù×÷ϵͳµ÷ÓÃÊÇÓÉÓµÓзþÎñÆ÷½ø³ÌµÄÕÊ»§µÄ°²È«ÐÔÉÏÏÂÎÄÀ´´ ......
×î½ü´¦ÀíexcelÊý¾Ýµ¼Èëµ½Sql ServerÖУ¬Ê§°Ü£¬±¨´íÈçÏÂ
£º
×÷
ΪԴÁÐ3£¨“²úƷ˵Ã÷”£©µÄÊý¾Ý¶ÔÓÚËùÖ¸¶¨µÄ»º³åÇøÀ´½²Ì«´ó
¡£
ÎÒµÄexcelÎļþÖÐÓÐÒ»ÁнГ²úƷ˵Ã÷”£¬¾ÍÊÇһЩ
ÎÄ×Ö¡£Sql
server´¦Àíµ¼excelÊý¾ÝÁ÷³ÌÊÇÕâÑùµÄ£¬Ëü»áÏÈ´´½¨Ä¿±ê±í£¬ÔÙ°ÑexcelÊý¾ÝдÈ뻺³åÇø£¬È»ºóÔÙ°Ñ»º³åÇøÊý ......