Oracle»ù´¡Óï¾ä
1¡¢
Á¬½ÓÊý¾Ý¿â
connect uuu/ooo
connect
sys/ok as sysdba
2¡¢
´´½¨±í¿Õ¼ä
create tablespace stu(±í¿Õ¼äÃû
) datafile
‘
e:\stu.dbf
’
size 100m autoextend on next 5m maxsize 500m;
3¡¢
ɾ³ý±í¿Õ¼ä
drop tablespace stu including contents and datafiles;
4¡¢
´´½¨Óû§
create user uuu(̞
) identified by uuu(
ÃÜÂë
) default tablespace stu(
±í¿Õ¼äÃû
);
5¡¢
ÐÞ¸ÄÓû§ÃÜÂë
alter user uuu identified by ppp(xÐÂÃÜÂë
);
6¡¢
ɾ³ýÓû§
drop user uuu casoade;
7¡¢
Ëø¶¨Óû§
alter user uuu account lock;
8¡¢
½âËøÓû§
alter user uuu account unlock;
9¡¢
ÊÚÓèÓû§È¨ÏÞ
grant all to uuu(̞
);
//ÊÚȨËùÓÐȨÏÞ
grant create session to uuu;
//ÊÚȨÁ¬½ÓÊý¾Ý¿âȨÏÞ
grant connect,resource to uuu;
10¡¢
²é¿´Óû§È¨ÏÞ
select * from user_sys_privs;
11¡¢
ɾ³ýÓû§È¨ÏÞ
revoke all from uuu;
12¡¢
´´½¨±í
create table STUDENT
(
STUNO VARCHAR2(20) not null,
STUNAME VARCHAR2(50),
BIRTHDAY DATE,
XUELI VARCHAR2(10),
SEX INTEGER
)
tablespace STUDB
;
13¡¢
ɾ³ý±í
drop table student;
14¡¢
´´½¨Ö÷¼üÔ¼Êø
alter table student
add constraint
pk_stuno
primary key(stuNo);
´´½¨check
Ô¼Êø
alter table
student
add constraint
ck_name
check (
saly>100
);
15¡¢
´´½¨Íâ¼üÔ¼Êø
alter table STUDENT add constraint FK_SEX foreign key (SEX) refe
Ïà¹ØÎĵµ£º
ÓÃOracle9i×Ô´øµÄÆóÒµ¹ÜÀíÆ÷»òPL/SQLͼÐλ¯µÄ·½·¨´´½¨±í¿Õ¼äºÍÓû§ÒÔ¼°·ÖÅäȨÏÞÊÇÏà¶Ô±È½Ï¼òµ¥µÄ£¬±¾ÎÄÒª½éÉܵÄÊÇÁíÒ»ÖÖ·½·¨£¬Ê¹ÓÃOracle 9iËù´øµÄÃüÁîÐй¤¾ß£ºSQLPLUSÀ´´´½¨±í¿Õ¼ä£¬Õâ¸ö·½·¨ÓÃÆðÀ´¸ü¼Ó¼òÃ÷¿ì½Ý¡£
¼ÙÉè ......
Ê×ÏÈ£¬ÄãÒªÓÐÒ»ÕÅ±í£¡
CREATE TABLE example(
ID Number(4) NOT NULL PRIMARY KEY,
NAME VARCHAR(25 ......
MYSQL/MSSQL/ORACLEÊý¾Ý¿â½Å±¾´úÂë ÊÕ²Ø
/******************************************************************************/
/*
Ö÷Á÷Êý¾Ý¿âMYSQL/MSSQL/ORACLE²âÊÔÊý¾Ý¿â½Å±¾´úÂë
½Å±¾ÈÎÎñ:½¨Á¢4¸ö±í,Ìí¼ÓÖ÷¼ü,Íâ¼ü£¬²åÈëÊý¾Ý,½¨Á¢ÊÓͼ
ÔËÐл·¾³1:microsoft sqlserver 2000 ²éѯ·ÖÎöÆ÷
ÔËÐл·¾³2:mysql5.0 p ......
ÔÚOracleÊý¾ÝµÄ´æ´¢ÖУ¬¿ÉÒÔ°Ñ´æ´¢¿Õ¼äÏëÏóΪһ¸öË®¿â£¬Êý¾ÝÏëÏóΪˮ¿âÖеÄË®¡£Ë®¿âÖеÄË®µÄλÖÃÓÐÒ»ÌõÏß½Ð×öˮλÏߣ¬ÔÚOracleÖУ¬ÕâÌõÏß±»³ÆΪ¸ßˮλÏߣ¨High-warter mark, HWM£©¡£ÔÚÊý¾Ý¿â±í¸Õ½¨Á¢µÄʱºò£¬ÓÉÓÚûÓÐÈκÎÊý¾Ý£¬ËùÒÔÕâ¸öʱºòˮλÏßÊǿյģ¬Ò²¾ÍÊÇ˵HWMΪ×îµÍÖµ¡£µ±²åÈëÁËÊý¾ÝÒԺ󣬸ßˮλÏ߾ͻáÉÏÕÇ£¬µ«ÊÇÕâ ......
SolarisÉÏOracle×Ô¶¯Æô¶¯ÉèÖÃ
===========================================================
×÷Õß: tianying(http://tianying.itpub.net)
·¢±íÓÚ: 2005.04.03 21:51
·ÖÀà: ³õʼ·ÖÀà
³ö´¦: http://tianying.itpub.net/post/2852/24823
---------------------------------------------------------------
¸ÕÔ ......