SQL ServerºÍ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(0,1) value from dual;
13.È¡·ûºÅ
S:select sign(-8) value -1
O:select sign(-8) value from dual -1
14.Ô²ÖÜÂÊ
S:SELECT PI() value 3.1415926535897931
O:²»ÖªµÀ
15.sin,cos,tan ²ÎÊý¶¼ÒÔ»¡¶ÈΪµ¥Î»
ÀýÈ磺select sin(PI()/2) value µÃµ½1£¨SQLServer£©
16.Asin,Acos,Atan,Atan2 ·µ»Ø»¡¶È
17.»¡¶È½Ç¶È»¥»»(SQLServer£¬Oracle²»ÖªµÀ)
DEGREES£º»¡¶È-¡µ½Ç¶È
RADIANS£º½Ç¶È-¡µ»¡¶È
ÊýÖµ¼ä±È½Ï
18. Ç󼯺Ï×î´óÖµ
S:select max(value) value from
(select 1 value
union
select -2 value
union
select 4 value
union
select 3 value)a
O:select greatest(1,-2,4,3) value from dual
19. Ç󼯺Ï×îСֵ
S:select min(value) value from
(select 1 value
union
select -2 value
union
select 4 value
union
select 3 value)a
O:select least(1,-2,4,3) value from dual
20.ÈçºÎ´¦ÀínullÖµ(F2ÖеÄnullÒÔ10´úÌæ)
S:select F1,IsNull(F2,10) value from Tbl
O:select F1,nvl(F2,10) value from Tbl
21.Çó×Ö·ûÐòºÅ
Ïà¹ØÎĵµ£º
oracle±í¿Õ¼ä²Ù×÷Ïê½â
1
2
3×÷Õߣº À´Ô´£º ¸üÐÂÈÕÆÚ£º2006-01-04
5
6
7½¨Á¢±í¿Õ¼ä
8
9CREATE TABLESPACE data01
10DATAFILE '/ora ......
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
ÊìϤSQL SERVER 2000µÄÊý¾Ý¿â¹ÜÀíÔ±¶¼ÖªµÀ£¬ÆäDTS¿ÉÒÔ½øÐÐÊý¾ÝµÄµ¼Èëµ¼³ö£¬Æäʵ£¬ÎÒÃÇÒ²¿ÉÒÔʹÓÃTransact-SQLÓï¾ä½øÐе¼Èëµ¼³ö²Ù×÷¡£ÔÚTransact-SQLÓï¾äÖУ¬ÎÒÃÇÖ÷ҪʹÓÃOpenDataSourceº¯Êý¡¢OPENROWSET º¯Êý£¬¹ØÓÚº¯ÊýµÄÏêϸ˵Ã÷£¬Çë²Î¿¼SQLÁª»ú°ïÖú¡£ÀûÓÃÏÂÊö·½·¨£¬¿ÉÒÔÊ®·ÖÈÝÒ×µØʵÏÖSQL SERVER¡¢ACCESS¡¢EXCELÊý¾Ýת»»£ ......
±êÇ©£ºÊý¾Ý·ÃÎÊ ADO.NET
Ö±½ÓÖ´ÐÐSQLÃüÁî Ö´ÐÐÃæÏò¼¯ºÏµÄ²Ù×÷£¨ ......