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

SQLServer ºÍOracle³£Óú¯Êý¶Ô±È

1
.¾ø¶ÔÖµ 
S:
select
 
abs
(
-
1
) value
O:
select
 
abs
(
-
1
) value 
from
 dual 
¡¡¡¡
2
.È¡Õû(´ó) 
S:
select
 
ceiling
(
-
1.001
) value 
O:
select
 ceil(
-
1.001
) value 
from
 dual
¡¡¡¡
3
.È¡Õû£¨Ð¡£© 
S:
select
 
floor
(
-
1.001
) value 
O:
select
 
floor
(
-
1.001
) value 
from
 dual
¡¡¡¡
4
.È¡Õû£¨½ØÈ¡£©
S:
select
 
cast
(
-
1.002
 
as
 
int
) value 
O:
select
 trunc(
-
1.002
) value 
from
 dual
¡¡¡¡
5
.ËÄÉáÎåÈë
S:
select
 
round
(
1.23456
,
4
) value 
1.23460
O:
select
 
round
(
1.23456
,
4
) value 
from
 dual 
1.2346
¡¡¡¡
6
.eΪµ×µÄÃÝ 
S:
select
 
Exp
(
1
) value 
2.7182818284590451
 
O:
select
 
Exp
(
1
) value 
from
 dual 
2.71828182
¡¡¡¡
7
.È¡eΪµ×µÄ¶ÔÊý
S:
select
 
log
(
2.7182818284590451
) value 
1
O:
select
 ln(
2.7182818284590451
) value 
from
 dual; 
1
¡¡
¡¡
8
.È¡10Ϊµ×¶ÔÊý
S:
select
 
log10
(
10
) value 
1
O:
select
 
log
(
10
,
10
) value 
from
 dual; 
1
¡¡¡¡
9
.ȡƽ·½
S:
select
 
SQUARE
(
4
) value 
16
O:
select
 
power
(
4
,
2
) value 
from
 dual 
16
¡¡¡¡
10
.ȡƽ·½¸ù
S:
select
 
SQRT
(
4
) value 
2
O:
select
 
SQRT
(
4
) value 
from
 dual 
2
¡¡¡¡
11
.ÇóÈÎÒâÊýΪµ×µÄÃÝ
S:
select
 
power
(
3
,
4
) value 
81
O:
select
 
power
(
3
,
4
) value 
from
 dual 
81
¡¡¡¡
12
.È¡Ëæ»úÊý
S:
select
 
rand
() value 
O:
select
 sys.dbms_random.value(


Ïà¹ØÎĵµ£º

oracleÆô¶¯ÎÊÌâÒ»°ã½â¾ö·½·¨

oracleÆô¶¯ÎÊÌâ
Ò»£ºÊý¾Ý¿âûÓÐÆô¶¯
#sqlplus /nolog
sql>connect /as sysdba
sql>startup
 
¶þ£º¼àÌý³öÎÊÌâ
µÇ¼DB·þÎñÆ÷
ʹÓÃlsnrctl start/stop¿ªÆô/¹Ø±Õ¼àÌý
ʹÓÃlsnrctl status²é¿´×´Ì¬
ÀíӦΪ£º
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ERPAP)(PORT=1521)))
STATUS of the ......

²»Óð²×°Oracle ClientÈçºÎʹÓÃPLSQL Developer

²»Óð²×°Oracle ClientÈçºÎʹÓÃPLSQL Developer
1. ÏÂÔØoracleµÄ¿Í»§¶Ë³ÌÐò°ü£¨30M£©
      Ö»ÐèÒªÔÚOracleÏÂÔØÒ»¸ö½ÐInstant Client PackageµÄÈí¼þ¾Í¿ÉÒÔÁË£¬Õâ¸öÈí¼þ²»ÐèÒª°²×°£¬Ö»Òª½âѹ¾Í¿ÉÒÔÓÃÁË£¬ºÜ·½±ã£¬¾ÍËãÖØ×°ÁËϵͳ»¹ÊÇ¿ÉÒÔÓõġ£
      ÏÂÔص ......

oracle, stored procedure, cursor

CREATE OR REPLACE PROCEDURE kevin_proc(x varchar) IS
a VARCHAR(20);
b VARCHAR(20);
CURSOR mycur(rn NUMBER) IS SELECT * from t_kevin_test WHERE ROWNUM<rn;
BEGIN
OPEN mycur(10);
LOOP FETCH mycur INTO a,b;
EXIT WHEN mycur%NOTFOUND;
Dbms_Output.put_line('a: '||a);
Dbms_Output.put_line('b: '| ......

¶à¸öoracleÊý¾Ý¿âÖ®¼äÊý¾Ý¹²Ïí database link

ÒòΪ¹«Ë¾µÄÕÆÉϳÇÊÐϵͳÔÚ¶à¸öµØÊÆͬʱÉÏÏߣ¬¶øΪÁËÈÃÿ¸ö³ÇÊеÄ3G¿ìѶ¾ßÓеØÊÆÌØÉ«ÐÔ£¬Ã¿¸öµØÊÆÓÐ×Ô¼ºµ¥¶ÀµÄÊý¾Ý¿âϵͳ£¬¶øÿ¸öµØÊƵĿìѶÓÖһЩ¹²Í¬µÄ£¬Æ©ÈçͻȻ³öÁËÒ»Ìõ¹ú¼ÊÐÂÎÅ£¬ÄÇôÊDz»ÊÇÿ¸öµØÊƵĺǫ́±à¼­¶¼ÒªÂ¼ÈëÒ»±é£¬ÕâÑùÎÞÒÉÊÇ×öÁËÐí¶àÎÞÓù¦£¬ËùÒÔ¹«Ë¾¿¼ÂǼÜÉèÒ»¸ö×ÜÕ¾£¬×ÜÕ¾ÉÏÓÐרÃŵÄÈ˸ºÔð£¬Ã¿Ì츺Ôð¼ÈëÒ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ