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

oracle PL/SQL Öг£Á¿ºÍ±äÁ¿µÄÉùÃ÷

 
Ò»¡¢³£ÓÃÊý¾ÝÀàÐÍ£º
Number£ºÊý×ÖÀàÐÍ
Int£ºÕûÊýÐÍ
Pls_integer£ºÕûÊýÐÍ£¬²úÉúÒç³öµÄ´íÎó
Binary_integer£ºÕûÊýÐÍ
Char£º¶¨³¤×Ö·û£¬×255¸ö×Ö·û
Varchar2£º±ä³¤×Ö·û£¬×2000¸ö×Ö·û
Long£º±ä³¤×Ö·û£¬×2GB
Date£ºÈÕÆÚÐÍ
Boolean£º²¼¶ûÐÍ
¶þ¡¢¶¨Òå³£Á¿
¸ñʽ£º³£Á¿Ãû   constant    Êý¾ÝÀàÐͱêʶ·û    [not null] := Öµ
Àý : iCount constant Int not null:=200
˵Ã÷: ¶¨Òå³£Á¿iCount,ֵΪ200;
Èý¡¢¶¨Òå»ù±¾Êý¾ÝÀàÐͱäÁ¿
      ¸ñʽ£º±äÁ¿Ãû ÀàÐͱêʶ·û [not null] := Öµ
      Àý £ºsex Boolean not null :=0;
      ˵Ã÷£º¶¨Òå±äÁ¿sex ֵΪ0;
ËÄ¡¢¸´ºÏÊý¾ÝÀàÐͱäÁ¿
      1¡¢Ê¹ÓÃ%TYPE¶¨Òå±äÁ¿
˵Ã÷£ºÕâ¸öÐÍʽÊÇΪÁËÈñäÁ¿µÄÊý¾ÝÀàÐÍÓë±íÖеÄÊý¾ÝÀàÐÍÒ»Öµģ¬¶¨ÒåºÃÒԺ󣬱íÖеÄÊý¾ÝÀàÐ͸ı䣬Õâ¸ö±äÁ¿µÄÊý¾ÝÀàÐÍҲͬʱ¸Ä±ä£»
¸ñʽ£º±äÁ¿Ãû Óû§Ãû.±íÃû.×Ö¶ÎÃû%TYPE£»
Àý : sex SCOTT.Tdetails.SEX%TYPE£»
˵Ã÷£ºsex±äÁ¿¾ÍÓëscottÓû§ÏµÄTdetails±íÖеÄsex×ֶεÄÀàÐÍÒ»Ö£»
      2¡¢¼Ç¼ÀàÐͱäÁ¿
           ˵Ã÷£º½«¶à¸öÊý¾ÝÀàÐÍÀ¦°óÔÚÒ»ÆðµÄÊý¾ÝÀàÐÍ
           ¸ñʽ£ºTYPE ±äÁ¿Ãû IS RECORD(
                      ±äÁ¿Ãû1 »ù±¾Êý¾ÝÀàÐÍ£¬
                      ±äÁ¿Ãû2 »ù±¾Êý¾ÝÀàÐÍ£¬……);
           Àý £ºTYPE tRecords IS RECORD(
                      Name varchar2,
                      Sex Boolean);
            


Ïà¹ØÎĵµ£º

¶¯Ì¬SQLÓï¾ä

¶¯Ì¬Óï¾ä
1 :ÆÕͨSQLÓï¾ä¿ÉÒÔÓÃexecÖ´ÐÐ
Select * from tableName
exec('select * from tableName')
exec sp_executesql N'select * from tableName' -- Çë×¢Òâ×Ö·û´®Ç°Ò»¶¨Òª¼ÓN
2:×Ö¶ÎÃû£¬±íÃû£¬Êý¾Ý¿âÃûÖ®Àà×÷Ϊ±äÁ¿Ê±£¬±ØÐëÓö¯Ì¬SQL
declare @fname varchar(20)
set @fname = 'FiledName'
Select @fnam ......

Oracle EXP/IMP²ÎÊýÏê½â

exp/impÊÇOracle×Ô´øµÄµ¼Èëµ¼³öÃüÁÔËÓÃËü£¬¼´Ê¹²»ÐèÒªÄǽáUI¹¤¾ßÒ²ÄÜÇáÒ×µÄÍê³ÉÊý¾Ýµ¼³öµ¼È빤×÷£¬ÏÂÃæÊÇËüÃǵIJÎÊý£º
EXP²ÎÊýÏê½â
ʹÓõĸñʽÊÇ£ºEXP KEYWORD=value »ò KEYWORD=(value1,value2,...,valueN)
ÆäÖÐUSERIDÊDZØÐëµÄÇÒΪµÚÒ»¸ö²ÎÊý
¹Ø¼ü×Ö
±¸×¢
USERID
Óû§Ãû/¿ÚÁî
FULL
µ¼³öÕû¸öÎļþ (N)
BUFFER ......

oracle½«×Ö·û´®×ª»»Îª12СʱÓë24Ð¡Ê±ÖÆ£º


oracle½«×Ö·û´®×ª»»Îª12СʱÓë24Ð¡Ê±ÖÆ£º
--12Ð¡Ê±ÖÆ£º
select hsv.mydate from huhai_seq_value  hsv
where hsv.mydate = to_date('2009-03-03 00:00:00','yyyy-mm-dd hh:mi:ss');
--24Ð¡Ê±ÖÆ£º
select hsv.mydate from huhai_seq_value  hsv
where hsv.mydate = to_date('2009-03-03 00:00:00','yyyy-m ......

SQLÀàÐÍ

SQL ServerÊý¾ÝÀàÐÍ2009Äê02ÔÂ02ÈÕ ÐÇÆÚÒ» 11:20Êý¾ÝÀàÐÍÊÇÊý¾ÝµÄÒ»ÖÖÊôÐÔ£¬ÊÇÊý¾ÝËù±íʾÐÅÏ¢µÄÀàÐÍ¡£ÈκÎÒ»ÖÖÓïÑÔ¶¼ÓÐËü×Ô¼ºËù¹ÌÓеÄÊý¾ÝÀàÐÍ£¬SQL ServerÌṩһÏÂ25ÖÖ¹ÌÓеÄÊý¾ÝÀàÐÍ¡£ SQL ServerÊý¾ÝÀàÐÍÒ»ÀÀ±í
¡¡¡¡·Binary [(n)]
·Varbinary [(n)]
·Char [(n)]
·Varchar[(n)]
· ......

SQL*LoaderʹÓÃÖ¸ÄÏ

Oracle µÄSQL*LOADER¿ÉÒÔ½«ÍⲿÊý¾Ý¼ÓÔØµ½Êý¾Ý¿â±íÖС£ÏÂÃæÊÇSQL*LOADERµÄ»ù±¾Ìص㣺
1£©ÄÜ×°È벻ͬÊý¾ÝÀàÐÍÎļþ¼°¶à¸öÊý¾ÝÎļþµÄÊý¾Ý
2£©¿É×°Èë¹Ì¶¨¸ñʽ£¬×ÔÓɶ¨½çÒÔ¼°¿É¶È³¤¸ñʽµÄÊý¾Ý
3£©¿ÉÒÔ×°Èë¶þ½øÖÆ£¬Ñ¹ËõÊ®½øÖÆÊý¾Ý
4£©Ò»´Î¿É¶Ô¶à¸ö±í×°ÈëÊý¾Ý
5£©Á¬½Ó¶à¸öÎïÀí¼Ç¼װµ½Ò»¸ö¼Ç¼ÖÐ
6£©¶ÔÒ»µ¥¼Ç¼·Ö½âÔÙ×°Èëµ½± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ