OracleÊý¾Ý¿âµÄһЩ²Ù×÷
ÈçºÎ±¸·ÝOracleÊý¾Ý¿â£º
MD F:\DB_BAK\%date:~0,10%
EXP userid=bszlhr/bszlhr@ORCL_14 file=F:\DB_BAK\%date:~0,10%\bszlhr%date:~0,10%.dmp log=f:\DB_BAK\%date:~0,10%\log_bszlhr_%date:~0,10%.log
buffer=64000 owner=bszlhr
-----´´½¨ÐÅÓÃÐÅÏ¢µÄ±í----------
create table GCCredit(
itemID number(10,0),
EmpID number(10,0),
CreditCots varchar2(100),
Notes varchar(100)
)
select * from GCCredit
GCV_Credit
-------´´½¨ÐÅÓÃÐÅÏ¢µÄÊÓͼ------
CREATE OR REPLACE VIEW GCV_Credit (
filepath,
unitid,
deptno,
empno,
empname,
position,
itemid,
empid,
creditcots,
notes
)
AS
Select emp.FilePath ,emp.UnitID, emp.DeptNo, emp.EmpNo, emp.EmpName,emp.position,
c.itemid,c.empid,c.creditcots,c.notes
from GCCredit c, GCEmployee emp
WHERE emp.EmpID = c.EmpID
select * from GCV_Credit
----1.ÓÃÀ´²éѯËùÐèÒªµÄÓ¦ÓóÌÐò------------------
select * from gc_appobjects where obj_class like '%Credit%';
-----2.ÓÃÀ´²éѯËùÐèÒªµÄÊý¾Ý¶ÔÏó-----------------
select * from gc_dbobjects where obj_class like '%Credit%';
------3.ÓÃÀ´²éѯÊý¾Ý¶ÔÏóÖÐËù°üº¬µÄ×Ö¶Î--------
select * from gc_columns where obj_id in (
select obj_id from gc_dbobjects where obj_class like '%Credit%');
1. ÔÚoracleÖÐÈçºÎ»ñȡǰ10ÌõµÄ¼Ç¼£º
select * from tablename where rownum<11 order by colname desc
2. ÔÚoracleÖеĶà±íÁ¬½Ó²éѯ£¬
Oracle¶à±íÁ¬½ÓÓë×Ó²éѯ
Posted on 2009-07-02 13:17 ÖÙºêࣨanmo£© ÔĶÁ(456) ÆÀÂÛ(0) ±à¼ ÊÕ²Ø
1£ºµÈÖµÁ¬½Ó
µÏ¿¨¶û¼¯Á¬½Ó
select ename, a.deptno as a_deptno,b.deptno as b_deptno ,b.dn
Ïà¹ØÎĵµ£º
ÓÐÁ½ÖÖº¬ÒåµÄ±í´óС¡£Ò»ÖÖÊÇ·ÖÅä¸øÒ»¸ö±íµÄÎïÀí¿Õ¼äÊýÁ¿£¬¶ø²»¹Ü¿Õ¼äÊÇ·ñ±»Ê¹Ó᣿ÉÒÔÕâÑù²éѯ»ñµÃ×Ö½ÚÊý£º
select segment_name, bytes
from user_segments
where segment_type = 'TABLE';
»òÕß
Select Segment_Name,Sum(bytes)/1024/1024 from User_Extents Group By Segment_Name
ÁíÒ»ÖÖ±íʵ¼ÊÊ¹Ó ......
1£®OracleΪ¿Í»§¶Ë¿ªÆô»á»°ÓÐÁ½ÖÖ·½Ê½£º¹²Ïí·þÎñºÍרÓ÷þÎñ¡£ÔÚרÓ÷þÎñÇé¿öÏ£¬¼àÌýÆ÷ΪÁ¬½ÓÇëÇó´´½¨Ð½ø³Ì£¨Unix»·¾³ÏÂÊÇProcess£¬WindowsÏÂÎÒÏëÓ¦¸ÃÊÇThread°É£©£»¹²Ïí·þÎñÇé¿öÏ£¬¼àÌýÆ÷½«¿Í»§ÇëÇ󽻸øDispatcher£¬ÓÉDispatcher°²ÅŶà¿Í»§µÄ×÷Òµ¡£SQL ServerÔÚĬÈÏÇé¿öÏÂ×Ô¶¯Îª¿Í»§¶ËÁ¬½Ó´´½¨Ị̈߳¬µ±Óзdz£¶àµÄ¿Í ......
Ò».OracleÊý¾Ý¿âÖг£ÓõÄÊý¾ÝÀàÐÍ
varchar2(³¤¶È)¿É±ä³¤×Ö·û´®
char(³¤¶È) ¶¨³¤
number()±íʾÕûÊý»òÕ߸¡µãÊýnumber(8) number(8,2)
clog ×Ö·ûµÄ´ó¶ÔÏó
blog ¶þ½øÖƵĴó¶ÔÏó
¶þ.Êý¾Ý¿â²éѯ
1£©SELECTÓï¾ä
´Ó±íÖÐÌáÈ¡²éѯÊý¾Ý.Ó﷨ΪSELECT [DISTINCT] {column1,column2,…} from tablename WHERE {con ......
ÈÔȻʹÓÃSCOTTÓû§À´²Ù×÷£º
1¡¢ ÏÔʾ¹¤×ʱȲ¿ÃÅ30µÄËùÓÐÔ±¹¤µÄ¹¤×ʶ¼¸ßµÄÔ±¹¤µÄÐÅÏ¢£º
Select * from emp where sal>all(select sal from emp where deptno=30);
2¡¢ ÏÔʾ¹¤×ʱȲ¿ÃÅ30µÄÈÎÒâÒ»¸öÔ±¹¤µÄ¹¤×ʸ߾ͿÉÒ ......