ORACLEÏÂɾ³ýµ±Ç°Óû§ÏÂËùÓжÔÏóµÄSQL
ORACLEÏÂɾ³ýµ±Ç°Óû§ÏÂËùÓжÔÏóµÄSQL
Sql´úÂë
--ɾ³ýij¸öÓû§ÏµĶÔÏó
set heading off;
set feedback off;
spool c:\dropobj.sql;
prompt --Drop constraint
select 'alter table '||table_name||' drop constraint '||constraint_name||' ;' from user_constraints where constraint_type='R';
prompt --Drop tables
select 'drop table '||table_name ||';' from user_tables;
prompt --Drop view
select 'drop view ' ||view_name||';' from user_views;
prompt --Drop sequence
select 'drop sequence ' ||sequence_name||';' from user_sequences;
prompt --Drop function
select 'drop function ' ||object_name||';' from user_objects where object_type='FUNCTION';
prompt --Drop procedure
select 'drop procedure '||object_name||';' from user_objects where object_type='PROCEDURE';
prompt --Drop package
prompt --Drop package body
select 'drop package '|| object_name||';' from user_objects where object_type='PACKAGE';
prompt --Drop database link
select 'drop database link '|| object_name||';' from user_objects where object_type='DATABASE LINK'; &
Ïà¹ØÎĵµ£º
´´½¨ÁËÒ»oracleµÄ¶¨Ê±ÈÎÎñ£¬¶¨Ê±µÄ½«Ò»¸ö±íÖеļǼ²åÈëµ½ÁíÒ»¸ö±íÖУ¬²éѯµÄʱºò±íÖо¹È»Ã»Êý¾Ý£¬ÔÚpl/sqlÖв鿴½¨µÄÈÎÎñ·¢ÏÖfailuresµÄֵΪ3£¬ÄѵÀ½¨µÄ´æ´¢¹ý³ÌÓÐ´í£¿ÔËÐÐһϴ洢¹ý³ÌÊÔÊÔ°É£¬²éÊý¾Ý¿âÊ飬ִÐд洢¹ý³ÌÃüÁîÊÇ£ºcall procedure ¹ý³ÌÃû£»
Ö´ÐÐÒ»ÏÂÃüÁ²»¶Ô£¿ÔÙ´ÓÍøÉϲé°É£¬Ò»²é£¬oracleÖÐÖ´Ðд洢¹ý³ÌµÄ ......
Êý¾ÝÀàÐÍ
²ÎÊý
ÃèÊö
char(n)
n=1 to 2000×Ö½Ú
¶¨³¤×Ö·û´®£¬n×Ö½Ú³¤£¬Èç¹û²»Ö¸¶¨³¤¶È£¬È±Ê¡Îª1¸ö×Ö½Ú³¤£¨Ò»¸öºº×ÖΪ2×Ö½Ú£©
varchar2(n)
n=1 to 4000×Ö½Ú
¿É±ä³¤µÄ×Ö·û´®£¬¾ßÌ嶨ÒåʱָÃ÷×î´ó³¤¶Èn£¬
ÕâÖÖÊý¾ÝÀàÐÍ¿ÉÒÔ·ÅÊý×Ö¡¢×ÖĸÒÔ¼°ASCIIÂë×Ö·û¼¯(»òÕßEBCDICµÈÊý¾Ý¿âϵͳ½ÓÊܵÄ×Ö·û¼¯±ê×¼)ÖеÄËùÓзûºÅ¡£
Èç¹ ......
ÁÙʱ±íµÄ¸ÅÄ
ÔÚOracleÊý¾Ý¿âÖл¹ÓÐÒ»ÖÖÀàÐÍµÄ±í£¬½Ð×öÁÙʱ±í¡£Õâ¸öÁÙʱ±í¸úÓÀ¾Ã±í×î´óµÄÇø±ð¾ÍÊDZíÖеÄÊý¾Ý²»»áÓÀÔ¶µÄ´æÔÚ¡£µ±Ò»¸ö»á»°½áÊø»òÕßÊÂÎñ½áÊøµÄʱºò£¬Õâ¸öÁÙʱ±íÖеÄÊý¾Ý£¬²»ÓÃÓû§×Ô¼ºÉ¾³ý£¬Êý¾Ý¿â×Ô¼º»á×Ô¶¯Çå³ý¡££¨±íÊÇÈ«¾Ö£¬Ö»ÊÇÊý¾ÝÏûʧ£©
O ......
oracle.client 9.0.1.0.0
©À1-Oracle Programmer 9.0.1.0.0
©¦ ©ÀOracle Call Interface (OCI) 9.0.1.0.0
©¦ ©ÀObject Type Translator 9.0.1.0.0
©¦ ©¸Pro*C/C++ 9.0.1.0.0
©À2-Oracle Enterprise Manager Products 9.0.1.0.0
©¦ ©¸Oracle Enterprise Manager Cli ......
²âÊÔtable
create table table1 (id int,name char)
insert into table1
select 1,'q'
union all select 2,'r'
union all select 3,'3'
union all select 4,'5'
ÒªÇó°´Ö¸¶¨µÄid˳Ðò(±ÈÈç2,1,4,3)ÅÅÁлñÈ¡table1µÄÊý¾Ý
·½·¨1:ʹÓÃunion all,µ«ÊÇÓÐ256ÌõÊý¾ÝµÄÏÞÖÆ
select id,name from table1 where id=2
union al ......