Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle 10g»ù´¡²Ù×÷±í

¡¡¡¡1´´½¨Ð±í
¡¡¡¡1.1´Ó²éѯµ½µÄ±í´´½¨±í
¡¡¡¡create table temp as select stuName,stuNo,stuSex from stuInfo where stuAge>25;
¡¡¡¡1.2´´½¨Ð±í
¡¡¡¡/*ѧÉúÐÅÏ¢±í*/
¡¡¡¡create table stuInfo(
¡¡¡¡stuName varchar2(10) ,
¡¡¡¡stuNo varchar2(10),
¡¡¡¡stuSex varchar2(4),
¡¡¡¡stuAge number(2),
¡¡¡¡stuSeat number(10),
¡¡¡¡stuAddress varchar2(400));
¡¡¡¡/*ѧÉú³É¼¨±í*/
¡¡¡¡create table stuMark(
¡¡¡¡examNo varchar2(10),
¡¡¡¡stuNo varchar2(10),
¡¡¡¡writtenExam number(4),
¡¡¡¡labExam number(4));
¡¡¡¡2 Ð޸ıí
¡¡¡¡2.1 Ôö¼Ó×Ö¶Î
¡¡¡¡alter table stuInfo add(Zip number(6));
¡¡¡¡2.2 ɾ³ý×Ö¶Î
¡¡¡¡alter table stuInfo drop column Zip
¡¡¡¡2.3 ÐÞ¸Ä×Ö¶ÎÀàÐÍ
¡¡¡¡alter table stuInfo modify(Zip varchar2(6));
¡¡¡¡2.4ÐÞ¸Ä×ֶδóС
¡¡¡¡alter table stuInfo modify(Zip number(4));
¡¡¡¡2.5 ɾ³ý±í
¡¡¡¡drop table stuInfo
¡¡¡¡3Ô¼Êø
¡¡¡¡3.1Ìí¼ÓÔ¼Êø
¡¡¡¡alter table stuInfo add constraint PK_stuNo primary key(stuNo);
¡¡¡¡alter table stuInfo add constraint CK_stuSex check(stuSex in('ÄÐ','Å®'));
¡¡¡¡alter table stuInfo add constraint CK_stuAge check(stuAge between 15 and 40);
¡¡¡¡alter table stuInfo add constraint CK_stuSeat check(stuSeat between 1 and 30);
¡¡¡¡alter table stuMark add constraint PK_ExamNo_stuMark  primary key(examNo);
¡¡¡¡alter table stuMark add constraint FK_stuNo_stuMark  foreign key(stuNo) references stuInfo(stuNo);
¡¡¡¡select stuName,decode(stuSex,'ÄÐ','ÄÐͬ־'),
¡¡¡¡(stuSex,'Å®','Ůͬ־')
¡¡¡¡from stuInfo;
¡¡¡¡alter table stuInfo modify(stuSex not null);
¡¡¡¡3.2ɾ³ýÔ¼Êø
¡¡¡¡3.2.1ɾ³ýÆÕͨԼÊø
¡¡¡¡alter table stuInfo drop constraint CK_stuSex;
¡¡¡¡3.2.2ɾ³ý±»Íâ¼ü²ÎÕÕµÄÖ÷¼üÔ¼Êø
¡¡¡¡alter table stuInfo drop primary key PK_StuNo
¡¡¡¡4Ë÷Òý
¡¡¡¡4.1´´½¨Ë÷Òý
¡¡¡¡create index stuName_index on stuInfo(stuName);
¡¡¡¡4.2ɾ³ýË÷Òý
¡¡¡¡drop index stuName_index;
¡¡¡¡5´´½¨ÐòÁÐ
¡¡¡¡5.1 ´´½¨ÐòÁÐ
¡¡¡¡create sequence stuSeat_identity
¡¡¡¡minvalue 1
¡¡¡¡maxvalue 99999999
¡¡¡¡start with 1
¡¡¡¡increment by 1
¡¡¡¡cache 2
¡¡¡¡5.2´¥·¢Æ÷ʵÏÖ×Ö¶ÎÁÐ×ÔÔö³¤


Ïà¹ØÎĵµ£º

Oracle ²ÎÊýÎļþ×ܽá

1:pfileºÍspfile
ÔÚ9i֮ǰ£¬²ÎÊýÎļþÖ»ÓÐÒ»ÖÖ£¬ËüÊÇÎı¾¸ñʽµÄ£¬³ÆΪpfile£¬ÔÚ9i¼°ÒÔºóµÄ°æ±¾ÖУ¬ÐÂÔöÁË·þÎñÆ÷²ÎÊýÎļþ,³ÆΪspfile,ËüÊǶþ½øÖƸñʽµÄ¡£ÕâÁ½ÖÖ²ÎÊýÎļþ¶¼ÊÇÓÃÀ´´æ´¢²Î ÊýÅäÖÃÒÔ¹©oracle¶ÁÈ¡µÄ£¬µ«Ò²Óв»Í¬µã£¬×¢ÒâÒÔϼ¸µã£º
1)pfileÊÇÎı¾Îļþ£¬spfileÊǶþ½øÖÆÎļþ£»
2)¶ÔÓÚ²ÎÊýµÄÅäÖã¬pfile¿ÉÒÔÖ±½ÓÒÔÎ ......

Oracle³£ÓÃSqlÓï¾ä

1. ´´½¨ÊÓͼ£º
CREATE OR REPLACE VIEW SM_V_UNIT_AUTH AS
SELECT T2.UNIT_ID,
        T2.SUPER_UNIT_ID,
        T1.AUTH_ID,
        T1.AUTH_NAME,
        T1.A ......

Oracle»Ö復ÒâÍâ刪³ýµÄ數據

 1. flashback table table_test to timestamp to_timestamp('20091103000000','yyyymmddhh24miss');
 2.Èç¹û報錯ORA-08189: cannot flashback the table because row movement is not enabled
 3.alter table table_test enable row movement;
 4.OK ......

ORACLEÁÙʱ±íºÍSQLSERVERÁÙʱ±íÒìͬ

 SQL SERVERÁÙʱ±í
Ò²¿ÉÒÔ´´½¨ÁÙʱ±í¡£ÁÙʱ±íÓëÓÀ¾Ã±íÏàËÆ£¬µ«ÁÙʱ±í´æ´¢ÔÚ tempdb ÖУ¬µ±²»ÔÙʹÓÃʱ»á×Ô¶¯É¾³ý¡£
Óб¾µØºÍÈ«¾ÖÁ½ÖÖÀàÐ͵ÄÁÙʱ±í£¬¶þÕßÔÚÃû³Æ¡¢¿É¼ûÐԺͿÉÓÃÐÔÉϾù²»Ïàͬ¡£±¾µØÁÙʱ±íµÄÃû³ÆÒÔµ¥¸öÊý×Ö·ûºÅ (#) ´òÍ·£»
ËüÃǽö¶Ôµ±Ç°µÄÓû§Á¬½ÓÊǿɼûµÄ£»µ±Óû§´Ó Microsoft? SQL Server? 2000 ʵÀý¶Ï ......

oracle Data Mining

 Executive Overview
The Oracle Data Mining Option provides powerful data mining functionality within the Oracle Database. It enables you to discover new insights hidden in your data and to leverage your investment in Oracle Database technology. With Oracle Data Mining, you can build and apply ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ