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

Oracle PL/SQL¿é½á¹¹ºÍ×é³ÉÔªËØѧϰ±Ê¼Ç(Ò»)

Ò»£¬PL/SQL¿éµÄ½á¹¹ºÍ×é³ÉÔªËØ
PL/SQL³ÌÐòÓÉÉùÃ÷²¿·Ö£¬Ö´Ðв¿·Ö£¬Òì³£´¦Àí²¿·ÖÈý¸ö²¿·Ö×é³É¡£½á¹¹ÈçÏ£º
DECLARE
/*ÉùÃ÷²¿·Ö£ºÔÚ´ËÉùÃ÷PL/SQL±äÁ¿£¬ÀàÐͼ°Óα꣬ÒÔ¼°¾Ö²¿µÄ´æ´¢¹ý³ÌºÍº¯Êý*/
BEGIN
/*Ö´Ðв¿·Ö£º¹ý³Ì¼°sqlÓï¾ä£¬³ÌÐòÖ÷Òª²¿·Ö£¬ÊDZØÐëµÄ*/
EXCEPTION
/*Òì³£´¦Àí²¿·Ö£º´íÎó´¦Àí*/
END
 
PL/SQL¿é·ÖΪÈýÀࣺ
1£¬ ÎÞÃû¿é£º¶¯Ì¬¹¹Ô죬ֻÄÜÖ´ÐÐÒ»´Î¡£
2£¬ ×Ó³ÌÐò£º´æ´¢ÔÚÊý¾Ý¿âÖеĴ洢¹ý³Ì¡¢º¯Êý¼°°üµÈ£¬ÔÚÊý¾Ý¿âÉϽ¨Á¢ºÃÒÔºó¿ÉÒÔÔÚÆäËû³ÌÐòÖе÷ÓÃËüÃÇ¡£
3£¬ ´¥·¢Æ÷£ºÊý¾Ý¿â·¢Éú²Ù×÷ʱ£¬´¥·¢Ê¼þ£¬´Ó¶ø×Ô¶¯Ö´ÐÐÏàÓ¦µÄ³ÌÐò¡£
 
PL/SQL±êʶ·û£º
PL/SQL³ÌÐòÉè¼ÆÖеıêʶ·û¶¨ÒåÓëSQLµÄ±êʶ·û¶¨ÒåµÄÒªÇóÏàͬ£¬ÒªÇóÈçÏ£º
1£¬ ±êʶ·ûÃû²»Äܳ¬¹ý30¸ö×Ö·û¡£
2£¬ µÚÒ»¸ö×Ö·û±ØÐëΪ×Öĸ¡£
3£¬ ²»·Ö´óСд¡£
4£¬ ²»ÄÜÓüõºÅ£¨-£©¡£
5£¬ ²»ÄÜÊÇSQL±£Áô×Ö¡£
6£¬ ²»Òª°Ñ±äÁ¿ÃûÓë±í×Ö¶ÎÖеÄÃûÒ»Ñù£¬¿ÉÄܵõ½²»ÕýÈ·µÄ½á¹û¡£
 
±äÁ¿ÃüÃû¹æÔòÈçÏ£º
±êʶ·û£¨±äÁ¿£©
ÃüÃû¹æÔò
ʾÀý
³ÌÐò±äÁ¿
V_name
V_username
³ÌÐò²úÁ¿
C_name
C_username
Óαê±äÁ¿
Name_cursor
Emp_cursor
Òì³£±êʶ
E_name
E_null_exception
±íÀàÐÍ
Name_table_type
Emp_userInfo_type
±í
Name_table
userInfo
¼Ç¼ÀàÐÍ
Name_record
Emp_record
SQL*PlusÌæ´ú±äÁ¿
P_name
P_sal
°ó¶¨±äÁ¿
G_name
G_sal
 
±äÁ¿ÀàÐÍÈçÏ£º
ÀàÐÍ
×ÓÀà
˵Ã÷
·¶Î§
OracleÏÞÖÆ
CHAR
Character
String
Rowid
Nchar
¶¨Òå×Ö·û´®
 
 
Ãñ×åÓïÑÔ×Ö·û¼¯
0¡«32767£¬¿Éѡȱʡ=1
2000
VARCHAR2
Varchar,String,
NVARCHAR2
¿É±ä×Ö·û´®
Ãñ×åÓïÑÔ×Ö·û¼¯
0¡«32767
4000
4000
BINARY_INTEGER
 
´ø·ûºÅÕûÊý£¬ÎªÕûÊý¼ÆËãÓÅ»¯ÐÔÄÜ
 
 
NUMBER(p,s)
Dec
Double
Precision
Integer
Int
Numeric
Real
Small int
СÊý£¬NUMBERµÄ×ÓÀàÐÍ
¸ß¾«¶ÈʵÊý
ÕûÊý£¬NUMBERµÄ×ÓÀàÐÍ
ÕûÊý£¬NUMBERµÄ×ÓÀàÐÍ
ÕûÊý£¬NUMBERµÄ×ÓÀàÐÍ
ÓëNUMBERµÈ¼Û
ÓëNUMBERµÈ¼Û
ÕûÊý£¬±ÈintegerС
 
 
LONG
 
±ä³¤×Ö·û´®
0~2147483647
32767×Ö½Ú
DATE
 
ÈÕÆÚÐÍ
¹«ÔªÇ°4712Äê1ÔÂ1ÈÕÖÁ¹«Ôªºó4712Äê12ÔÂ31ÈÕ
 
BOOLEAN
 
²¼¶ûÐÍ
TRUE£¬FALSE£¬NULL
²»Ê¹ÓÃ
ROWID
 
´æ·ÅÊý¾Ý¿âÐкÅ
 
 
UROWID
 
ͨÓÃÐбêʶ·û£¬×Ö·ûÀàÐÍ
 
 
 


Ïà¹ØÎĵµ£º

Oracle redo undo commit rollbackÆÊÎö

¸Õ²ÅÔÚ¹äÒ»¸öÍøÓѵIJ©¿ÍµÄʱºò·¢ÏÖÁËһƪ¹ØÓÚREDO¡¢UNDO¡¢COMMIT¡¢ROLLBAKCµÄÎÄÕ¡£ËäÈ»ÄÚÈÝ¿ÉÄܲ»ÊÇÌرðÈ«Ã棬¿ÉÊÇ»¹ÊÇ×ܽáµÄͦºÃµÄ£¬×ª¹ýÀ´·½±ã½«À´Ñ§Ï°¡£
==================================================================================
redo--> undo-->datafile
insertÒ»Ìõ¼Ç¼ʱ£¬±í¸úundoµÄÐÅÏ¢¶¼»á ......

oracleÊý¾Ý¿âÁ¬½Ó³ØµÄʹÓà [Òý]




Êý¾Ý¿âÁ¬½ÓÊÇÒ»ÖֹؼüµÄÓÐÏ޵ݺ¹óµÄ×ÊÔ´£¬ÕâÒ»µãÔÚ¶àÓû§µÄÍøÒ³Ó¦ÓóÌÐòÖÐÌåÏÖµÃÓÈΪͻ³ö¡£¶ÔÊý¾Ý¿âÁ¬½ÓµÄ¹ÜÀíÄÜÏÔÖøÓ°Ïìµ½Õû¸öÓ¦ÓóÌÐòµÄÉìËõÐԺͽ¡×³ÐÔ£¬Ó°Ïìµ½³ÌÐòµÄÐÔÄÜÖ¸±ê¡£Êý¾Ý¿âÁ¬½Ó³ØÕýÊÇÕë¶ÔÕâ¸öÎÊÌâÌá³öÀ´µÄ¡£
Êý¾Ý¿âÁ¬½Ó³Ø¸ºÔð·ÖÅä¡¢¹ÜÀíºÍÊÍ·ÅÊý¾Ý¿âÁ¬½Ó£¬ËüÔÊÐíÓ¦ÓóÌÐòÖظ´Ê¹ÓÃÒ»¸öÏÖÓеÄÊý¾Ý¿ ......

Sql Server ÈÕÆÚ¸ñʽ»¯º¯Êý

Sql Server ÖÐÒ»¸ö·Ç³£Ç¿´óµÄÈÕÆÚ¸ñʽ»¯º¯Êý
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06
Select CONVERT(varchar(100), GE ......

SQL Server 2008 й¦ÄÜ

SQL Server 2008 й¦ÄÜ
 
 ÓÃÓÚ¹ÜÀíµÄй¦ÄÜÓÐÄÄЩ£¿
¶ÔÓÚ¾­³£Òª¸ºÔð¹ÜÀí·Ö²¼ÔÚÊýʮ̨ÉõÖÁÊý°Ų̀·þÎñÆ÷ÖеÄÊýÒ԰ټƻòǧ¼ÆµÄ´óÐ͸´ÔÓÊý¾Ý¿â»·¾³µÄÊý¾Ý¿â¹ÜÀíÔ±¶øÑÔ£¬ÐµIJßÂÔ¹ÜÀí¡¢¶à·þÎñÆ÷²éѯ¹¦ÄÜ¡¢ÅäÖ÷þÎñÆ÷ÒÔ¼°Êý¾ÝÊÕ¼¯Æ÷/¹ÜÀí²Ö¿â¹¦ÄÜΪËûÃǸ³ÓèÁËÇ¿´óµÄÄÜÁ¦¡£
 
 ÓÃÓÚ¿ÉÉìËõÐÔµÄй¦ÄÜÓÐÄ ......

SQL ServerËÀËø×ܽá

1. ËÀËøÔ­Àí
    ¸ù¾Ý²Ù×÷ϵͳÖеĶ¨Ò壺ËÀËøÊÇÖ¸ÔÚÒ»×é½ø³ÌÖеĸ÷¸ö½ø³Ì¾ùÕ¼Óв»»áÊͷŵÄ×ÊÔ´£¬µ«Òò»¥ÏàÉêÇë±»ÆäËû½ø³ÌËùÕ¾Óò»»áÊͷŵÄ×ÊÔ´¶ø´¦ÓÚµÄÒ»ÖÖÓÀ¾ÃµÈ´ý״̬¡£
    ËÀËøµÄËĸö±ØÒªÌõ¼þ£º
»¥³âÌõ¼þ(Mutual exclusion)£º×ÊÔ´²»Äܱ»¹²Ïí£¬Ö»ÄÜÓÉÒ»¸ö½ø³ÌʹÓá£
ÇëÇóÓë±£³ÖÌõ¼þ(Ho ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ