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

ÔÚSQLÖÐÏò¶à¸öÊý¾Ý¿âÖвåÈëÏàͬµÄ¼Ç¼

½ñÌìÒ»¸öÅóÓÑÎʵ½Õâ¸öÎÊÌ⣬ÆäʵºÜºÃ½â¾ö£º
declare   @dbname   varchar(50)  
  declare   c_database   cursor   for  
      select   name   from   master.dbo.sysdatabases   where   name   like   '%Êý¾Ý¿âÃû%'  
  open   c_database  
  fetch   next   from   c_database   into   @dbname  
  while   @@fetch_status=0  
  begin  
      exec('use   '+@dbname  
            +'   insert   into   ±íÃû(×Ö¶Î)   values(''ÄÚÈÝ'')')  
      fetch   next   from   c_database   into   @dbname  
  end  
  close   c_database  
  deallocate   c_database
go


Ïà¹ØÎĵµ£º

Oracle PL/SQLÓïÑÔÈëÃÅ

Ò»¡¢±³¾°½éÉÜ
¡¡¡¡
¡¡¡¡½á¹¹»¯²éѯÓïÑÔ(Structured Query Language£¬¼ò³ÆSQL)ÊÇÓÃÀ´·ÃÎʹØÏµÐÍÊý¾Ý¿âÒ»ÖÖͨÓÃÓïÑÔ£¬ÊôÓÚµÚËÄ´úÓïÑÔ£¨4GL£©£¬ÆäÖ´ÐÐÌØµãÊǷǹý³Ì»¯£¬¼´²»ÓÃÖ¸Ã÷Ö´ÐеľßÌå·½·¨ºÍ;¾¶£¬¶øÊǼòµ¥µØµ÷ÓÃÏàÓ¦Óï¾äÀ´Ö±½ÓÈ¡µÃ½á¹û¼´¿É¡£ÏÔÈ»£¬ÕâÖÖ²»¹Ø×¢ÈκÎʵÏÖϸ½ÚµÄÓïÑÔ¶ÔÓÚ¿ª·¢ÕßÀ´ËµÓÐ׿«´óµÄ±ãÀû¡£È»¶ø£¬Ó ......

¹ØÓÚsql trace ºÍ 10046ʼþµÄ˵Ã÷

Ô­ÎĵØÖ·£ºhttp://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htm
SQL_TRACEÊÇOracleÌṩµÄÓÃÓÚ½øÐÐSQL¸ú×ÙµÄÊֶΣ¬ÊÇÇ¿ÓÐÁ¦µÄ¸¨ÖúÕï¶Ï¹¤¾ß.ÔÚÈÕ³£µÄÊý¾Ý¿âÎÊÌâÕï¶ÏºÍ½â¾öÖУ¬SQL_TRACEÊǷdz£³£Óõķ½·¨¡£
±¾ÎľÍSQL_TRACEµÄʹÓÃ×÷¼òµ¥Ì½ÌÖ£¬²¢Í¨¹ý¾ßÌå°¸Àý¶Ôsql_traceµÄʹÓýøÐÐ˵Ã÷.
Ò»¡¢ »ù´¡½éÉÜ
(a) ......

Linq to sqlϵÁÐÎÄÕÂ


Ò»²½Ò»²½Ñ§Linq to sql£¨Ò»£©£ºÔ¤±¸ÖªÊ¶
Ò»²½Ò»²½Ñ§Linq to sql£¨¶þ£©£ºDataContextÓëʵÌå 
Ò»²½Ò»²½Ñ§Linq to sql£¨Èý£©£ºÔöɾ¸Ä
Ò»²½Ò»²½Ñ§Linq to sql£¨ËÄ£©£º²éѯ¾ä·¨
Ò»²½Ò»²½Ñ§Linq to sql£¨Î壩£º´æ´¢¹ý³Ì
Ò»²½Ò»²½Ñ§Linq to sql£¨Áù£©£ºÌ½¾¿ÌØÐÔ 
Ò»²½Ò»²½Ñ§Linq to sql£¨Æß£©£º²¢·¢ÓëÊÂÎñ ......

×î½üµÄÁ½ÌõsqlЧÂÊÓÅ»¯ÐĵÃ

µÚÒ»Ìõ£º
select * from where field in (1,2,3)   ÕâÖÖд·¨Ó¦¸ÃÉáÆúÁË£¬¶øÓ¦¸ÃÕâÑùд£º
select * from table where field = 1 or field = 2 or field = 3 
ÎªÊ²Ã´ÄØ£¿
·²ÊÂÖ»ÓÐ×ö¹ý²ÅÖªµÀ£¬×Ô¼º½¨¸ö±í£¬²åÈë10WÌõ²âÊÔÊý¾Ý£¬ÓÃsql²âÊÔһϱãÖª£¬ÒòΪ¹¤×÷±ãÀû£¬ÎÒÔÚ²úÆ·»úºÍÍâÍø²âÊÔ»ú¶¼ÒѾ­²âÊÔ¹ý£ ......

SQL learning

Five basic search conditions are summarized here:
1) Comparison test
2) Range test
3) Set membership test
4) Pattern matching test (Like)
     The pattern matching test checks to see whether the data value in a column matches a specified pattern
   % mathes any se ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ