ORACLEº¯Êý´óÈ«
LONEFOXÌâ¼Ç£º
×î½ü¸ãORACLE£¬ ת¹ýÀ´¹©²Î¿¼¡£
=================================
1¡¢SQL Óï¾ä»ù´¡
ÏÂÃæ¸ø³öSQLÓï¾äµÄ»ù±¾½éÉÜ¡£
1.1¡¢SQLÓï¾äËùÓ÷ûºÅ
²Ù×÷·û
ÓÃ;
Àý×Ó
+ -
±íʾÕýÊý»ò¸ºÊý£¬ÕýÊý¿Éʡȥ +
-1234.56
+
½«Á½¸öÊý»ò±í´ïʽ½øÐÐÏà¼Ó
A=c+b
-
½«Á½¸öÊý»ò±í´ïʽ½øÐÐÏà¼õ
34-12
*
½«Á½¸öÊý»ò±í´ïʽ½øÐÐÏà³Ë
12*34
/
³ýÒÔÒ»¸öÊý»ò±í´ïʽ
18*11
NULL
¿ÕÖµÅжÏ
Where name is null;
||
×Ö·û´®Á¬½Ó
‘101-’||tel_num
=
µÈÓÚ²âÊÔ
Select * from emp where name=’ÕÔÔª½Ü’;
!= »ò<>»ò^=
²»µÈÓÚ²âÊÔ
Select * from emp where name !=’ÕÔÔª½Ü’;
<
СÓÚ²âÊÔ
Select * from emp where sal < 5000;
>
´óÓÚ²âÊÔ
Select * from emp where sal > 5000;
<=
СÓÚµÈÓÚ²âÊÔ
Select * from emp where sal <= 5000;
>=
´óÓÚµÈÓÚ²âÊÔ
Select * from emp where sal >= 5000;
Not in
²âÊÔijֵÊÇ·ñÔÚÒ»¸öÖ¸¶¨µÄ½á¹û¼¯ÖÐ
Select name,addr from expert where local not in(‘±±¾©’,’ÉϺ£’);
ANY
½«Ò»¸öÖµÓëÒ»×éÖµ½øÐбȽϣ¬·µ»ØÂú×ãÌõ¼þµÄ½á¹û¡£±ØÐë¸ú!=,<,>,<=,>=
select ename,sal from emp where sal<= any(select sal from emp where deptno=10)
SOME
ͬANY£¬±ØÐë¸ú!=,<,>,<=,>=
ALL
½«Ò»¸öÖµÓëÒ»×éÖµ±È½Ï£¬·µ»ØÂú×ãÌõ¼þµÄËùÓÐÁÐÖµ¡£±ØÐë¸ú!=,<,>,<=,>=
Select name,sal from emp w here sal<= all
( 500,800,1200);
Not between
A and B
ÅжÏij¸öÖµÊÇ·ñ½çÓÚÁ½ÕßÖ®¼ä¡£
Select name,sal from emp Where
sal between 500 and 1200;
[not]exists
ÅжÏij¸öÁÐÊÇ·ñ´æÔÚÓÚÒ»×éÖµÖС£
select dname,deptno from dept where exists
(select * from emp wher
Ïà¹ØÎĵµ£º
ºÃûÓÐÅöSolarisÁË£¬ÊÖÓÐЩÉúÁË£¬¿´À´ÕæÒª×°¸ösolaris£¬Æ½Ê±¶àÍæÍæ¡£
ÔÚsolarisÉÏ×°Oracle 10gÏÈ¡£
1. ¼ì²é°²×°ÒÀÀµ°ü
¹Ù·½ÒªÇóµÄ°ü
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt
Ö´ÐÐÃüÁî
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SU ......
³ÉÔ±º¯ÊýºÍ¹ý³Ì
¹¹Ô캯Êý·½·¨
-oracleµÄÿ¸ö¶ÔÏó¾ùÓÐÒ»¸öÄÚÖõĹ¹Ô캯Êý·½·¨
-ÓÃÓÚ´´½¨¶ÔÏóµÄÒ»¸öʵÀý
-ÎÞÐèÏÔʽµØ¶¨Òå
-Óë¶ÔÏóÀàÐÍͬÃû
¶¨Òå¶ÔÏóÀàÐÍ
create or replace
type persontype as object
(
id int,
name varchar(20),
member function ......
create or replace java source named FirstClass as
public class FirstClass{
public static String greeting(String name){
return "Hello " + name + "!";
}
}
/
create or replace function firstclass_greeting (name varchar2) ret ......
ÎÒ¶ÔORACLE BI µÄETLµÄһЩ×ܽᣨԣ© ÊÕ²Ø
http://blog.chinaunix.net/u/25176/showart_2036107.html
Êý¾Ý²Ö¿âÖеÄETLÏêϸµÄ·ÖΪËĸö½×¶Î£ºÌáÈ¡£¬´«Ê䣬ת»»£¬×°ÔØ¡£ÎÒÏȼòµ¥µÄ½éÉÜÒ»ÏÂÌáÈ¡ºÍ´«ÊäµÄ·ÖÀàºÍ·½·¨£º
Ò»£ºÌáÈ¡
ÌáÈ¡¿ÉÒÔ·ÖΪÂß¼ÌáÈ¡£¬ºÍÎïÀíÌáÈ¡¡£
1£ºÂß¼ÌáÈ¡°´ÕÕ¹æÄ£·ÖΪ£ºÍ ......
ORACLEÈÕÆÚʱ¼äº¯Êý´óÈ«
TO_DATE¸ñʽ(ÒÔʱ¼ä:2007-11-02 13:45:25ΪÀý)
Year:
yy two digits Á½Î»Äê &nb ......