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

Oracle ×î³£Óù¦Äܺ¯Êý¾­µä»ã×Ü

¡¡¡¡* SQL Group Function
*
s (num can be a column or ex
pression)¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡(null values are ign
*
ored, default between distin
ct and all is all)¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡********************
***************
****************************
****************
¡¡¡¡AVG([distinct or all] num)¡¡¡¡¡¡
-- average value
¡¡¡¡COUNT(distinct or all] num)¡¡¡¡
-- number of values
¡¡¡¡MAX([distinct or all
] num)¡¡¡¡¡¡-- maximum value
¡¡¡¡MAX([distinct or all] num)¡¡¡¡¡¡
-- minimum value
¡¡¡¡STDDEV([distinct or
all] num)¡¡ -- standard devi
ation
¡¡¡¡SUM([distinct or all
] num)¡¡¡¡¡¡-- sum of values
¡¡¡¡VARIANCE([distinct o
r all] num) -- variance of v
alues
¡¡¡¡¡¡
¡¡¡¡********************************
***********************
************************
¡¡¡¡* Miscellaneaous Functions :¡¡¡¡
*
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡
¡¡¡¡********************
***************
****************************
****************
¡¡¡¡DECODE(expr, srch1,
return1 [,srch2, return2...]
, default]
¡¡¡¡¡¡¡¡¡¡ -- if no search matches t
he expression then the default is returned,
¡¡¡¡¡¡¡¡¡¡ -- otherwise,
the first search that match
es will cause
¡¡¡¡¡¡¡¡¡¡ -- the corres
ponding return value to be r
eturned
¡¡¡¡DUMP(column_name [,fmt [,start_p
os [, length]]])
¡¡¡¡¡¡¡¡¡¡-- returns an
column
internal oracle format, used
for getting info about a
¡¡¡¡¡¡¡¡¡¡-- format options : 8 = oc
tal, 10 = decimel, 16 = hex, 17 = characters
¡¡¡¡¡¡¡¡¡¡-- return type
codes : 1 = varchar2, 2 = n
umber, 8 = long, 12 = date,
¡¡¡¡¡¡¡¡¡¡--¡¡ 23 = raw,
24 = long raw, 69 = rowid,
96 = char, 106 = mlslabel
¡¡¡¡GREATEST(expr [,expr2 [, expr3...]]
¡¡¡¡¡¡¡¡¡¡-- returns the largest val
ue of all expressions
¡¡¡¡LEAST(expr [,expr2 [, expr3...]]
¡¡¡¡¡¡¡¡¡¡-- returns the
smallest value of all expre
ssions
¡¡¡¡NVL(expr1 ,expr2
¡¡¡¡¡¡¡¡¡¡-- if expr1 is not null, i
t is returned, otherwise expr2 is returned
¡¡¡¡SQLCODE
¡¡¡¡¡¡¡¡¡¡


Ïà¹ØÎĵµ£º

jdbcÁ¬½ÓOracle

      ËäȻѧϰJavaºÜ¾ÃÁË£¬×Ô¼ºÒ²Á¬½Ó¹ýһЩÊý¾Ý¿â£¬±ÈÈçmysqlÖ®ÀàµÄ£¬Èç½ñÄØ£¬Ò²Ñ§Ï°ÁËÒ»¶Îʱ¼äµÄOracle£¬È»¶øÄØ£¬½ñÌìÊÇÎÒµÚÒ»´ÎÁ¬½ÓOracle£¬ºÙºÙ£¬Ó¦¸Ã»¹²»ËãÌ«³Ù°É¡£
    ½ñÌìÄØ£¬Óе㱿׾£¬´ó¼ÒĪЦ£¡
    ÎÒÕâÊÇÒ»¸ö²éѯÀý×Ó
    Ê×ÏÈ£¬Ô ......

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 in ......

sqlÓï¾ä¹éÄÉ£¨oracle£©

¶ÔÈÕ³£¹¤×÷ÖÐÓõ½µÄ¸Ð¾õÓÐÓõÄsqlÓï¾ä×ö¸ö¹éÄÉ£¬ÓÃÓÚ½ñºóιÊ֪С£
*¸´ÖÆ±í£º
create table tablename  as  select * from table_src;
create table tablename  as  select * from table_src where 1 <> 1; --Ö»¸´ÖƱí½á¹¹ ......

oracleÖÐÈçºÎʵÏÖ¸øµ±Ç°Ê±¼ä¼ÓÒ»·ÖÖÓ£¿

 select   to_char(sysdate   +   1   /   (24   *   60),'yyyy/mm/dd   hh24:mi:ss')   from   dual
SQL>   ;  
      1     select   to_char(sysdate,   'hh:mi:ss')  
      2 &nbs ......

ÓëoracleÏà¹ØµÄһЩÃüÁî

1.µÇ½ϵͳÓû§
sqlplus È»ºóÊäÈëϵͳÓû§ÃûºÍÃÜÂë
µÇ½±ðµÄÓû§
conn Óû§Ãû/ÃÜÂë;
2.´´½¨±í¿Õ¼ä
create tablespace ¿Õ¼äÃû
datafile 'c:\¿Õ¼äÃû' size 15M --±í¿Õ¼äµÄ´æ·Å·¾¶,³õʼֵΪ15M
autoExtend on next 10M --¿Õ¼äµÄ×Ô¶¯Ôö³¤µÄÖµÊÇ10M
permanent online; --ÓÀ¾ÃʹÓÃ
3.´´½¨Óû§
create user s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ