MS SQL Server ¡¢Sybase¡¢ OracleÖ§³ÖËø¶¨·½°¸µÄ²»Í¬
»¹ÊǼ¸Î»¶ÁÎÒµÄÊé (¡¶Oracle´óÐÍÊý¾Ý¿âϵͳÔÚAIX UNIXÉϵÄʵսÏê½â¡·) µÄ¶ÁÕßÀ´Óʼþ×ÉѯÎÊÌ⣬ºÜ±§Ç¸ÎÒ²»ÄÜÖðλ»Ø¸´Óʼþ£¬µÚÒ»ÎÒÕæµÄͦ棬µÚ¶þÕâЩÎÊÌâÆÄÓй²ÐÔ¡£ÎÒÀ´½èÖúÕâ¸öµØ·½£¬Í³Ò»µØºÍÖîλ̽ÌÖ£¬ºÜ¶àÎÊÌâÎÒÒ²ÊÇÔÚÃþË÷ÖУ¬²»ÄÜÖ±½Ó¸ø´ó¼Ò´ð°¸£¬ºÇºÇ£¬´ó¼Ò¼ûÁ°¡!
˵˵ËøÎÊÌâ¡£ MS SQLÖ§³ÖµÄËøÀàÐͺÍOracle²îÒìÊǺܴóµÄ£¡
OracleÖ§³ÖµÄËø¶¨·½°¸ÎªÐÐËø£¬Ò»ÖÖ³ÆΪ“¾«Ï¸µÄ”ËøÄ£ÐÍ¡£ÔÚ¸ÃÄ£ÐÍÏ£¬Ò»¸öÊý¾Ý¿âÓû§µÄ¶Á²Ù×÷²»»á·Á°ÆäËû²¢·¢Óû§Õë¶Ô¸ÃÊý¾ÝµÄ¸üÐÂÀàÐͲÙ×÷£¬ÕýÔÚ¸üеÄÊý¾ÝÐÐÒ²¿ÉÒÔ±»ÆäËû²¢·¢Óû§¶ÁÈ¡£¬Èç¹û·¢ÉúÁ˲¢Ðеġ¢ÔÚͬÑùÊý¾ÝÉϵĸüÐÂÐÐΪ£¬ÔòOracleµÄËø»úÖƻἴ¿ÌÉúЧ£¬ÒÔ·ÀÖ¹Êý¾ÝµÄÔà¶ÁºÍÊý¾Ý¸²¸Ç¡£
OracleµÄÐÐËø·½°¸ÎªÕûÌåÊý¾Ý¿âÌṩÁ˽ϸߵIJ¢·¢ÐÔÄÜ£¬Í¬Ê±Ò²Î¬»¤ÁËÊý¾Ý¿âÊý¾ÝµÄÔ×ÓÐÔºÍÒ»ÖÂÐÔ£¬ÔÚÈçͼËùʾµÄÁ½¸öÓû§²¢·¢½ø³Ì——ËüÃÇͬʱÍê³ÉÁ˸÷×ԵIJÙ×÷£¬È´Ã»Óл¥Ïà²úÉú¸ÉÈÅ¡£
ͼ OracleµÄÐÐËø·½°¸¼°ÆäЧ¹û
ÔÚMS SQL Server / Sybase ASEϵͳÖУ¬Ëø¶¨·½°¸ÊÇ¿ÉÒÔÖ¸¶¨µÄ£¬Ã¿¸ö±í¶¼¿ÉÒÔÓµÓÐ×Ô¼ºµÄËøģʽ£¬¿ÉÒÔÓÐÈçϵÄËø¶¨·½°¸£º
ËùÓÐÒ³£ºË÷ÒýÒ³ºÍÊý¾ÝÒ³¶¼±»Ëø¶¨
Êý¾ÝÒ³£ºËø¶¨Êý¾ÝÒ³
Êý¾ÝÐУº½öËø¶¨Êý¾ÝÐÐ
ÔÚMS SQL ServerÖУ¬»¹¿ÉÒÔÆôÓûùÓÚÐа汾¿ØÖƵĸôÀ뼶±ð,Ó¦ÓÿÉÒÔÖ¸¶¨ÊÂÎñʹÓÃÐа汾²é¿´ÊÂÎñ»ò²éѯ¿ªÊ¼Ê±´æÔÚµÄÊý¾Ý£¬¶ø²»Ê¹ÓÃËø±£»¤ËùÓжÁÈ¡¡£Í¨¹ýʹÓÃÐа汾¿ØÖÆ£¬¶ÁÈ¡²Ù×÷»áºÜÉÙ×èÖ¹ÆäËûÊÂÎñµÄ½øÐС£
ÔÚSybaseÖÐ, ĬÈϵÄËø¶¨·½°¸ÊÇËùÓÐÒ³——Êý¾Ý¸üÐÂÖÐͬʱËø¶¨Êý¾Ý¶ÔÓ¦µÄÊý¾ÝÒ³ºÍË÷Òý¶ÔÓ¦µÄË÷ÒýÒ³£¬Ò²¿ÉÒÔ²ÉÓÃDOL±í——ÔÚÊý¾Ý¸üÐÂÖнöËø¶¨Êý¾ÝÒ³£¬»òÕßRow LockingËø¶¨·½°¸£¬½öËø¶¨Êý¾ÝÐм´¿É¡£SybaseÔÊÐí¸ü¸Ä±íµÄËø¶¨·½°¸£¬Èçͼ16-14Ëùʾ£¬¿ÉÒÔÐÞ¸ÄËø¶¨·½°¸ÎªËùÓÐÒ³¡¢Êý¾ÝÒ³»òÊý¾ÝÐС£
ËùÒÔ£¬MS SQL Server¡¢Sybase¡¢OracleÕæµÄÊǸ÷Óв»Í¬£¬¸÷ÓÐǧÇ³ÌÐòÒªÊÇÒÆÖ²£¬ÐèÒª×öµÄ¹¤×÷Ðí¶à…
ÎÄƽ
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
Êý¾ÝÀàÐÍ
²ÎÊý
ÃèÊö
char(n)
n=1 to 2000×Ö½Ú
¶¨³¤×Ö·û´®£¬n×Ö½Ú³¤£¬Èç¹û²»Ö¸¶¨³¤¶È£¬È±Ê¡Îª1¸ö×Ö½Ú³¤£¨Ò»¸öºº×ÖΪ2×Ö½Ú£©
varchar2(n)
n=1 to 4000×Ö½Ú
¿É±ä³¤µÄ×Ö·û´®£¬¾ßÌ嶨ÒåʱָÃ÷×î´ó³¤¶Èn£¬
ÕâÖÖÊý¾ÝÀàÐÍ¿ÉÒÔ·ÅÊý×Ö¡¢×ÖĸÒÔ¼°ASCIIÂë×Ö·û¼¯(»òÕßEBCDICµÈÊý¾Ý¿âϵͳ½ÓÊܵÄ×Ö·û¼¯±ê×¼)ÖеÄËùÓзûºÅ¡£
Èç¹ ......
delete ɾ³ýÒ»ÕÅ´ó±íʱ¿Õ¼ä²»ÊÍ·Å£¬·Ç³£ÂýÊÇÒòΪռÓôóÁ¿µÄϵͳ×ÊÔ´£¬Ö§³Ö»ØÍ˲Ù×÷£¬¿Õ¼ä»¹±»ÕâÕűíÕ¼ÓÃ×Å¡£
truncate table ±íÃû (ɾ³ý±íÖмǼʱÊͷűí¿Õ¼ä)
DML Óï¾ä£º
±í¼¶¹²ÏíËø£º ¶ÔÓÚ²Ù×÷Ò»ÕűíÖеIJ»Í¬¼Ç¼ʱ£¬»¥²»Ó°Ïì
Ðм¶ÅÅËüËø£º¶ÔÓÚÒ»ÐмǼ£¬oracle »áÖ»ÔÊÐíÖ»ÓÐÒ»¸öÓû§¶ÔËüÔÚͬһʱ¼ä½øÐÐÐ޸IJÙ×÷ ......
ÔÚÊý¾Ý¿âµÄÈÕ³£Î¬»¤ÖУ¬µ÷Õû¸ö±ðÐÔÄܽϲîµÄSQLÓï¾äÊÇÒ»Ï¸»ÌôÕ½ÐԵŤ×÷¡£ÆäÖеĹؼüÔÚÓÚÈçºÎµÃµ½SQLÓï¾äµÄÖ´Ðмƻ®ºÍÈçºÎ´ÓSQLÓï¾äµÄÖ´Ðмƻ®Öз¢ÏÖÎÊÌâ¡£×ÜÊÇÏ뽫ÈÕ³£¾ÑéµÄµãµãµÎµÎ×ܽáһϣ¬µ«ÊÇÖ±µ½×î½ü²Å϶¨¾öÐÄ£¬×ܹ²»¨ÁË3¸öÖÜĩʱ¼ä£¬²Å½«ÆäÕûÀí³É²á£¬±ãÓÚ×Ô¼ºÈÕ³£¹¤×÷¡£ÏÖÔÚ½«Æä·¢±í³öÀ´Ï£ÍûÄÜÓë¸ü¶àµÄÅóÓÑ·Ö ......
select GETDATE() as 'µ±Ç°ÈÕÆÚ',
DateName(year,GetDate()) as 'Äê',
DateName(month,GetDate()) as 'ÔÂ',
DateName(day,GetDate()) as 'ÈÕ',
DateName(dw,GetDate()) as 'ÐÇÆÚ',
DateName(week,GetDate()) as 'ÖÜÊý',
DateName(hour,GetDate()) as 'ʱ',
DateName(minute,GetDate()) as '·Ö',
DateName(second,Ge ......