[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)--%ROWTYPEµÄʹÓÃ
ʹÓÃPackageµÄÓŵãÔÚÓÚÌṩÁ˱ØÐèµÄ³ÌÐòÉè¼Æ½á¹¹, ´Ù½øÁËÄ£¿é»¯±à³ÌÉè¼Æ, ×îÖØÒªµÄÊÇPackage¶Ï¿ªÁËÒÀÀµÁ´, ʹµÃ¶Ôij¸öÊý¾Ý¿âģʽµÄ¸Ä¶¯²»»áµ¼ÖÂÕû¸öģʽµÄÎÞЧ,´Ó¶ø±ÜÃâÁË°º¹óµÄÖرàÒë!
ÀýÈç: ´æÔÚtable t , procedure p1 p2, view v, function f, ËüÃÇÖ®¼äÒýÓùØϵÈçÏ£º
select name,type,referenced_name,referenced_type from user_dependencies
where referenced_owner='SCOTT'
order by name;
F FUNCTION T TABLE
P1 PROCEDURE V VIEW
P2 PROCEDURE P1 PROCEDURE
V VIEW T TABLE
µ±alter table t add y numberʱ, ÒÀÀµÓÚtµÄËùÓжÔÏó(°üÀ¨´«µÝÒÀÀµµÄ¶ÔÏó, ¼´p1ÒÀÀµÓÚt, p2ÒÀÀµÓÚp1)¾ÍÈ«²¿ÎÞЧ, ÐèÒªÖØбàÒë(Èç¹û´úÂëºÜ¸´ÔÓ, ¾Í»áÓнϴóµÄÏûºÄ)
select user_objects.object_name,user_objects.object_type,user_objects.status from user_objects
F FUNCTION INVALID
P1 PROCEDURE INVALID
&
Ïà¹ØÎĵµ£º
ÔÚExcelÖУ¬ÎÒÃÇʱ³£»áÅöµ½ÕâÑùµÄ×Ö¶Î(×î³£¼ûµÄ¾ÍÊǵ绰ºÅÂë)£¬¼´Óд¿Êý×ÖµÄ(ÈçûÓдøÇøºÅµÄµç»°ºÅÂë)£¬ÓÖÓÐÊý×ÖºÍÆäËü×Ö·û»ìºÏ (Èç“ÇøºÅ-µç
»°ºÅÂë”)µÄÊý¾Ý£¬ÔÚµ¼ÈëSQLServer¹ý³ÌÖУ¬»á·¢ÏÖҪô´¿Êý×ÖµÄÊý¾Ýµ¼¹ýÈ¥Ö®ºó±ä³ÉÁËNULL£¬ÒªÃ´¾ÍÊÇÊý×ÖºÍÆäËü×Ö·û»ìºÏµÄÊý¾Ýµ¼¹ýÈ¥Ö®ºó±ä³É
ÁËNULL¡£
&n ......
½ñÌì¸ø´ó¼Ò·ÖÏíÒ»ÏÂÈçºÎ±¸·ÝºÍ»Ø¸´sql server Êý¾Ý£¬
Ê×ÏÈÈ·±£Äã¾ßÓÐDBµÄ×î¸ßȨÏÞ
ÔÚJAVA´úÂëÖÐ Äã¿ÉÒÔÕâÑùдpublic class Opp extends TestCase{
public void test1()
{
try
{
Connection con = DBUtils.getConn();
String sql="backup database tdzl to disk='d:\\tdzl.bak'";
Statement st = con.c ......
ÔÚʹÓÃODP.NET½øÐÐOracle±à³Ìʱ£¬ÓÐʱºòSQLÓï¾ä·Ç³£¸´ÔÓ£¬ÐèÒª²ÉÓö¯Ì¬¹¹Ôì²éѯÓï¾äµÄÇé¿ö£¬ÓÐÁ½ÖÖ·½·¨¿ÉÒÔ¹¹Ô춯̬µÄSQLÓï¾ä£¬²¢Ö´Ðзµ»Ø½á¹û¼¯¡£
1¡¢ÔÚÊý¾Ý·ÃÎʲ㹹ÔìSQLÓï¾ä
ÀýÈçÏÂÃæµÄÓï¾ä£¬½«¹¹ÔìÍêÕûµÄSQLÓï¾ä¸³Öµ¸øCommandText£¬ÔÙ´«µÝµ½Êý¾Ý¿â½øÐÐÖ´ÐУ¬·µ»Ø½á¹û¼¯¡£
loadCommand.CommandType = Com ......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
Èç¹ûÎÒÃÇ°´ÕÕʾÀýÏëµÃµ½Ã¿¸ö²¿ÃÅнˮֵ×î¸ßµÄ¹ÍÔ±µÄ¼Í¼£¬¿ÉÒÔÓÐËÄÖÖ·½·¨ÊµÏÖ£ ......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Ò»)--αÁÐROWNUMʹÓü¼ÇÉ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(¶þ)--±êÁ¿×Ó²éѯ
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Èý)--PackageµÄÓŵã
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(ËÄ)--ÅúÁ¿´¦Àí
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Îå)--µ÷Óô洢¹ý³Ì·µ»Ø½á¹û¼¯
[Oracle]¸ßЧµÄPL/SQL³ÌÐòÉè¼Æ(Áù)- ......