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

sqlÖеÄDBO

DBOÊÇÿ¸öÊý¾Ý¿âµÄĬÈÏÓû§£¬¾ßÓÐËùÓÐÕßȨÏÞ£¬¼´DbOwner
ͨ¹ýÓÃDBO×÷ΪËùÓÐÕßÀ´¶¨Òå¶ÔÏó£¬Äܹ»Ê¹Êý¾Ý¿âÖеÄÈκÎÓû§ÒýÓöø²»±ØÌṩËùÓÐÕßÃû³Æ¡£
±ÈÈ磺ÄãÒÔUser1µÇ¼½øÈ¥²¢½¨±íTable£¬¶øÎ´Ö¸¶¨DBO£¬
µ±Óû§User2µÇ½øÈ¥Ïë·ÃÎÊTableʱ¾ÍµÃÖªµÀÕâ¸öTableÊÇÄãUser1½¨Á¢µÄ£¬ÒªÐ´ÉÏUser1.Table£¬Èç¹ûËû²»ÖªµÀÊÇÄ㽨µÄ£¬Ôò·ÃÎÊ»áÓÐÎÊÌâ¡£
Èç¹ûÄ㽨±íʱ°ÑËùÓÐÕßÖ¸¸øÁËDbo£¬Ôò±ðµÄÓû§½øÀ´Ê±Ð´ÉÏDbo.Table¾ÍÐÐÁË£¬²»±ØÖªµÀUser1¡£
²»¹â±íÊÇÈç´Ë£¬ÊÓͼµÈµÈÊý¾Ý¿â¶ÔÏó½¨Á¢Ê±Ò²ÒªÈç´Ë²ÅËãÊǺá£
½¨±í¡¢´æ´¢¹ý³Ì¡¢ÊÓͼµÈÊý¾Ý¿â¶ÔÏóʱ£¬Æä¶ÔÓ¦µÄËùÓÐÕßÊÇ´´½¨ËüµÄÓû§¡£Ôò³ýÁ˸ÃÓû§ÆäËûµÇ¼Óû§ÒªÒýÓÃÕâЩ¶«¶«Ê±£¬¶¼Òª¼ÓÉÏǰ׺£¬ºÜÊÇÂé·³¡£¶øÇÒ£¬³ÌÐòÒò´ËÒ׳ö´í£¬Äã²éÀ´²éÈ¥ÎÊÌâÈ·³öÔÚÕ⣬ÀË·ÑÄãʱ¼ä¡£


Ïà¹ØÎĵµ£º

ÈçºÎÇå³ýSQL serverÈÕÖ¾

  ǰ¼¸Ìì×öÒ»¸ö¹ØÓÚÊý¾Ý±íÓÅ»¯µÄ³ÌÐò£¬ÓÉÓÚÊý¾Ý¿âÀïÃæµÄ×ֶεĹØÏµ·Ç³£¸´ÔÓ£¬²Ù×÷ÆðÀ´±È½ÏÂé·³£¬¸ÕÓõÄʱºò»¹ºÃ£¬ÔËÐÐʱ¼äÒ»³¤£¬Éú³ÉµÄÊÂÎñÈÕÖ¾ºÜ´ó£¬Õ¼ÓÃÁË10¼¸G£¬´ÅÅ̶¼¿ìÓÃÍêÁË¡£
    µ½ÍøÉÏËÑÁËһϣ¬·½·¨ÏÂÃæÁ½ÖÖ£º
    1.·ÖÀëÊý¾Ý¿â£¬Ö±½Óɾ³ýÊÂÎñÈÕÖ¾Îļþ£¬ÔÙ¸½¼ÓÊý¾Ý¿â£¬ÏµÍ³ ......

oralce Éú³É10ÍòÌõ²âÊÔÊý¾ÝµÄsqlÓï¾ä

×öÊý¾Ý¿â¿ª·¢»ò¹ÜÀíµÄÈ˾­³£Òª´´½¨´óÁ¿µÄ²âÊÔÊý¾Ý£¬¶¯²»¶¯¾ÍÐèÒªÉÏÍòÌõ£¬Èç¹ûÒ»ÌõÒ»ÌõµÄ¼È룬ÄÇ»áÀË·Ñ´óÁ¿µÄʱ¼ä£¬±¾ÎĽéÉÜÁËOracleÖÐÈçºÎͨ¹ýÒ»ÌõSQL¿ìËÙÉú³É´óÁ¿µÄ²âÊÔÊý¾ÝµÄ·½·¨¡£
²úÉú²âÊÔÊý¾ÝµÄSQLÈçÏ£º
SQL> select rownum as id,
  2          &nbs ......

SQL Óë ORACLE µÄ±È½Ï (ת)


01¡¢SQLÓëORACLEµÄÄÚ´æ·ÖÅä
ORACLEµÄÄÚ´æ·ÖÅä´ó²¿·ÖÊÇÓÉINIT.ORAÀ´¾ö¶¨µÄ£¬Ò»¸öÊý¾Ý¿âʵÀý¿ÉÒÔÓÐNÖÖ·ÖÅä·½°¸£¬²»Í¬µÄÓ¦Óã¨OLTP¡¢OLAP£©ËüµÄÅäÖÃÊÇÓвàÖØµÄ¡£ SQL¸ÅÀ¨ÆðÀ´Ëµ£¬Ö»ÓÐÁ½ÖÖÄÚ´æ·ÖÅ䷽ʽ£º¶¯Ì¬ÄÚ´æ·ÖÅäÓ뾲̬ÄÚ´æ·ÖÅ䣬¶¯Ì¬ÄÚ´æ·ÖÅä³äÐíSQL×Ô¼ºµ÷ÕûÐèÒªµÄÄڴ棬¾²Ì¬ÄÚ´æ·ÖÅäÏÞÖÆÁËSQL¶ÔÄÚ´æµÄʹ Óá£
002¡¢SQ ......

sql ÅúÁ¿É¾³ýÊý¾Ý¿âÖÐµÄ±í £¨º¬ÓÐÍâ¼üÔ¼Êø£©

 Ð´·¨Ò»£º
set xact_abort on
begin tran
DECLARE @SQL VARCHAR(99)
DECLARE CUR_FK CURSOR LOCAL FOR
SELECT 'alter table '+ OBJECT_NAME(FKEYID) + ' drop constraint ' + OBJECT_NAME(CONSTID) from SYSREFERENCES
--ɾ³ýËùÓÐÍâ¼ü
OPEN CUR_FK
FETCH CUR_FK INTO @SQL
WHILE @@FETCH_STATUS =0
BEGIN
......

sql server 2000/2005 ÓαêµÄʹÓòÙ×÷

1. ¶¨ÒåÓα궨Òå
ÓαêÓï¾äµÄºËÐÄÊǶ¨ÒåÁËÒ»¸öÓαê±êʶÃû£¬²¢°ÑÓαê±êʶÃûºÍÒ»¸ö²éѯÓï¾ä¹ØÁªÆðÀ´¡£DECLAREÓï¾äÓÃÓÚÉùÃ÷Óα꣬Ëüͨ¹ýSELECT²éѯ¶¨ÒåÓÎ±ê´æ´¢µÄÊý¾Ý¼¯ºÏ¡£Óï¾ä¸ñʽΪ£º
DECLARE ÓαêÃû³Æ [INSENSITIVE] [SCROLL]
CURSOR FOR selectÓï¾ä
[FOR{READ ONLY|UPDATE[OF ÁÐÃû×Ö±í]}]
²ÎÊý˵Ã÷£º
INSENSITIVEÑ¡Ï ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ