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Æô¶¯ÎÊÌâ
Ò»£ºÊý¾Ý¿âûÓÐÆô¶¯
#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 ......
´óÖ·ÖΪÈý²¿·Ý£¬1.SQL£¬2.ERP±¾Éí£¬3.±¾»ú
1.Èç¹ûÊÇSQLµ¼³öʱ³öÏÖ£¬ÂÒÂë¿ÉÒÔͨ¹ýÐÞ¸ÄNLS_LANG£¬À´±ÜÃâÂÒÂ룬
·±ÌåÐ޸ijɣºTRADITIONAL CHINESE_TAIWAN.ZHT16BIG5
¼òÌåÐ޸ijÉ: SIMPLIFIED CHINESE_CHINA.ZHS16GBK
Ó¢ÎľͲ»ÓÃ˵ÁË£¡£¡
2.Èç¹ûÊÇERP export ʱ³öÏÖÂÒÂ룬¿ÉÒÔͨ¹ýÉèÖÃprofileÀ´ÉèÖÃFND: NATIVE CLIENT ENC ......
OracleµÄÈÕÆÚº¯Êý
³£ÓÃÈÕÆÚÐͺ¯Êý
1¡£Sysdate µ±Ç°ÈÕÆÚºÍʱ¼ä
SQL> Select sysdate from dual;
SYSDATE
----------
21-6ÔÂ -05
2¡£Last_day ±¾ÔÂ×îºóÒ»Ìì
SQL> Select last_day(sysdate) from dual;
LAST_DAY(S ......
ÒòΪ¹«Ë¾µÄÕÆÉϳÇÊÐϵͳÔÚ¶à¸öµØÊÆͬʱÉÏÏߣ¬¶øΪÁËÈÃÿ¸ö³ÇÊеÄ3G¿ìѶ¾ßÓеØÊÆÌØÉ«ÐÔ£¬Ã¿¸öµØÊÆÓÐ×Ô¼ºµ¥¶ÀµÄÊý¾Ý¿âϵͳ£¬¶øÿ¸öµØÊƵĿìѶÓÖһЩ¹²Í¬µÄ£¬Æ©ÈçͻȻ³öÁËÒ»Ìõ¹ú¼ÊÐÂÎÅ£¬ÄÇôÊDz»ÊÇÿ¸öµØÊƵĺǫ́±à¼¶¼ÒªÂ¼ÈëÒ»±é£¬ÕâÑùÎÞÒÉÊÇ×öÁËÐí¶àÎÞÓù¦£¬ËùÒÔ¹«Ë¾¿¼ÂǼÜÉèÒ»¸ö×ÜÕ¾£¬×ÜÕ¾ÉÏÓÐרÃŵÄÈ˸ºÔð£¬Ã¿Ì츺Ôð¼ÈëÒ» ......
»ù±¾µÄSql±àдעÒâÊÂÏî
¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔÓÃNOT EXISTS»òÕßÍâÁ¬½Ó+Ìæ´ú¡£
OracleÔÚÖ´ÐÐIN×Ó²éѯʱ£¬Ê×ÏÈÖ´ÐÐ×Ó²éѯ£¬½«²éѯ½á¹û·ÅÈëÁÙʱ±íÔÙÖ´ÐÐÖ÷²éѯ¡£¶øEXISTÔòÊÇÊ×Ïȼì²éÖ÷²éѯ£¬È»ºóÔËÐÐ×Ó²éѯֱµ½ÕÒµ½
µÚÒ»¸öÆ¥ÅäÏî¡£NOT EXISTS±ÈNOT INЧÂÊÉ ......