toad for oracle(µ¼Èëµ¼³öʵÀý)
Àý£º
create user his identified by his default tablespace users temporary tablespace temp;
grant connect,resource,dba to his;
create tablespace his
logging
datafile 'd:\oracle\product\10.2.0\oradata\zjxsh\his.ora' size 100M extent
management local segment space management auto;
exp his/ny@ny file=d:\0706ny full=y
exp his/his@xshis file=d:\0724xshis full=y
imp his/his@zjxshis file=d:\0724xshis.DMP fromuser=(his£¬chk£¬emr£¬fee£¬inv£¬med£¬opr£¬dig)touser=(his£¬chk£¬emr£¬fee£¬inv£¬med£¬opr£¬dig) ignore=y
imp his/his@zjxsh file=d:\0724xshis.DMP fromuser=his touser=his ignore=y
imp chk/chk@zjxsh file=d:\0724xshis.DMP fromuser=chk touser=chk ignore=y
imp emr/emr@zjxsh file=d:\0724xshis.DMP fromuser=emr touser=emr ignore=y
imp fee/fee@zjxsh file=d:\0724xshis.DMP fromuser=fee touser=fee ignore=y
imp inv/inv@zjxsh file=d:\0724xshis.DMP fromuser=inv touser=inv ignore=y
imp med/med@zjxsh file=d:\0724xshis.DMP fromuser=med touser=med ignore=y
imp opr/opr@zjxsh file=d:\0724xshis.DMP fromuser=opr touser=opr ignore=y
imp dig/dig@zjxsh file=d:\0724xshis.DMP fromuser=dig touser=dig ignore=y
imp mat/mat@zjxsh file=d:\0724xshis.DMP fromuser=mat touser=mat ignore=y
imp pas/pas@zjxsh file=d:\0724xshis.DMP fromuser=pas touser=pas ignore=y
create table name2 as select * from name1;
insert into name3 select * from name2;(*±íʾ±í×ֶΣ¬°´Ë³Ðò²åÈë)
ÓÐʱºòÎÒÃÇ»áÓöµ½ÕâÑùµÄÇé¿ö£¬ÏÖÓеÄÊý¾Ý¿âÒª´ÓÒ»¸ö»úÆ÷תÒƵ½ÁíÍâÒ»¸ö»úÆ÷ÉÏ£¬Ò»°ãÎÒÃÇ»áʹÓõ¼³ö£¬µ¼Èë¡£µ«ÊÇÈç¹ûÊý¾Ý¿âµÄÊý¾Ý·Ç³£¶à£¬Êý¾ÝÎļþ³ß´çºÜ´ó£¬ÄÇôÔÚµ¼³öµ¼ÈëµÄ¹ý³Ì¾ÍºÜ¿ÉÄÜ»á³öÏÖÎÊÌ⣬²¢ÇÒÂþ³¤µÄ¹ý³ÌÒ²ÊÇÎÒÃÇÎÞ·¨ÈÝÈ̵ġ£ ÔÚÕâÖÖÇé¿öÏ£¬ÎÒÃÇ¿ÉÒÔ¼òµ¥µØʹÓòÙ×÷ϵͳµÄcopyÃüÁֱ½Ó½øÐÐÊý¾Ý¿âµÄתÒÆ¡£ÒÔÏÂʾÀý¾ùÔÚRedhat Fedora Core 1ÉϵÄOracle9.2.0.1ÖвÙ×÷£¬ÆäËü²Ù×÷ϵͳºÍOracle°æ±¾Í¬ÑùÊÊÓ᣼ÙÉèÎÒÃǵÄÊý¾Ý¿âÔÚ·þÎñÆ÷AÉÏ£¬$ORACLE_BASEÊÇ/oracle£¬$ORACLE_HOMEÊÇ /oracle/prodUCt/9.2.0¡£ÏÖÔÚÎÒÃÇÒª½«´ËÊý¾Ý¿âתÒƵ½·þÎñÆ÷BÉÏ£¬²¢ÇÒеÄ$ORACLE_BASEÊÇ/u01/oracle£¬$ ORACLE_HOMEÊÇ/u01/oracle/product/9.2.0¡£SIDÊÇoraLinux¡£
²Ù×÷²½ÖèÈçÏ£º
Ïà¹ØÎĵµ£º
¡¶1¡·DDLÓï¾ä(Êý¾Ý¶¨ÒåÓïÑÔ) Data Define Language
create
alter
drop
truncate ¿ªÍ·µÄÓï¾ä truncate table <±íÃû>
Ìصã:<1>½¨Á¢ºÍÐÞ¸ÄÊý¾Ý¶ÔÏó
&nb ......
declare
begin
--SQLÓï¾ä
--Ö±½ÓдµÄSQLÓï¾ä(DML/TCL)
--¼ä½Óдexecute immediate <DDL/DCLÃüÁî×Ö·û´®>
--select Óï¾ä
<1>±ØÐë´øÓÐinto×Ó¾ä
&n ......
×î½üÏîÄ¿½ø¶È±È½Ï»ºÂý£¬³õ²½Ñо¿ÁËÒ»ÏÂOracleµÄ´æ´¢¹ý³Ì£¬½«´úÂëÌù³öÀ´¡£
Ê×ÏÈÏÈÌù³öÀ´OracleµÄ·ÖÒ³·ÖÒ³´æ´¢¹ý³Ì´úÂë°É¡£
1.ÕâÊÇ°üµÄ´úÂë
create or replace package DB_Oper is
-- Author : LIUBING
-- Created : 2009-10-28 15:01:30
-- Purpose : ²âÊÔOracleµ ......
ÎÒÏÖÔÚÔÚ×öÒ»¸öOracleÊý¾Ýµ¼È룬Ҫ½«EXCELÊý¾Ýµ¼Èëµ½OracleÊý¾Ý¿âÖУ¬ÏȶÁÈ¡Êý¾Ý£¬½«Êý¾Ý±£´æÔÚÒ»ÕÅÁÙʱ±íÖУ¬È»ºóµ¼Èë֮ǰ¶ÔÁÙʱ±íÖÐÊý¾ÝµÄÿ¸ö×Ö¶Î×öУÑ飬±ÈÈçÊý¾ÝÊÇ·ñΪÕûÊý£¬ÕûÊýµÄ×î´óλÊý£¬¼°µ¼ÈëµÄÊý¾ÝÔÚÔÊý¾Ý¿âÖÐÊÇ·ñÒѾ´æÔڵȣ¬ÎÒдÁËÒ»¸ö´æ´¢¹ý³Ì£¬¶ÔÒì³£µÄÊý¾Ý£¬½«×ֶΓis_checked”ÉèΪÒì³ ......