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

»ñÈ¡¾ÖÓòÍøSQL ServerʵÀýÐÅÏ¢

ÓÉÓÚ´úÂë¹ýÓÚ¼òµ¥£¬Ö±½ÓÌù³ö£º
SqlDataSourceEnumerator SseInstance = SqlDataSourceEnumerator.Instance;
//ServerName:·þÎñÆ÷Ãû;
//InstanceName:ʵÀýÃû;
//IsClustered:ÊÇ·ñΪȺ¼¯·þÎñÆ÷µÄÒ»²¿·Ö;
//Version:°æ±¾,8.*ÊÇSQL 2000,9.*ÊÇSQL 2005
DataTable DtSqlInstance = SseInstance.GetDataSources();

×¢£ºÐèÒýÓÃSystem.Data.SqlÃüÃû¿Õ¼ä£¬^_^
²âÊÔÔ´´úÂë(C#)ÏÂÔØ:LanSqlServer.rar


Ïà¹ØÎĵµ£º

SQLÈ«¾Ö±äÁ¿


SQL Server ϵͳȫ¾Ö±äÁ¿
@@CONNECTIONS
·µ»Ø×ÔÉÏ´ÎÆô¶¯ÒÔÀ´Á¬½Ó»òÊÔͼÁ¬½ÓµÄ´ÎÊý¡£
@@CURSOR_ROWS
·µ»ØÁ¬½ÓÉÏ×îºó´ò¿ªµÄÓαêÖе±Ç°´æÔڵĺϸñÐеÄÊýÁ¿(·µ»Ø±»´ò¿ªµÄÓαêÖл¹Î´±»¶ÁÈ¡µÄÓÐЧÊý¾ÝÐеÄÐÐÊý)
@@DATEFIRST
·µ»ØÿÖܵÚÒ»ÌìµÄÊý×Ö
@@ERROR
·µ»Ø×îºóÖ´ÐеÄSQL Óï¾äµÄ´íÎó´úÂë¡£
@@FETCH_STATUS
·µ ......

5±¾¾­µäSQLµç×ÓÊé


SQL±¦µä

SQL±ØÖª±Ø»áµÚÈý°æ

SQLÈëÞ­µäµÚËÄ°æ

Sams Teach Yourself SQL in 10 Minutes Third Edition

SQL The Complete Reference

......

ÌùÉÏÊղصÄSQL³£Ó÷ÖÒ³µÄ°ì·¨¡«¡«

Ó¦Ò»¸öÅóÓѵÄÒªÇó£¬ÌùÉÏÊղصÄSQL³£Ó÷ÖÒ³µÄ°ì·¨¡«¡«
±íÖÐÖ÷¼ü±ØÐëΪ±êʶÁУ¬[ID] int IDENTITY (1,1)
1.·ÖÒ³·½°¸Ò»£º(ÀûÓÃNot InºÍSELECT TOP·ÖÒ³)
Óï¾äÐÎʽ£º 
SELECT TOP Ò³¼Ç¼ÊýÁ¿ *
from ±íÃû
WHERE (ID NOT IN
  (SELECT TOP (ÿҳÐÐÊý*(Ò³Êý-1)) ID
  from ±íÃû
  ORDER BY ......

DB2 SQL PL½éÉÜ


DB2 SQL PL
SQL PLÊÇDB2ËùÖ§³ÖµÄ¹ý³Ì»¯ÓïÑÔ£¬ËüÊÇSQL/PSM±ê×¼µÄÒ»¸ö×Ó¼¯¡£Æä¸ù¾ÝÓ¦Ó÷¶Î§²»Í¬£¬ÓÖ·ÖΪInline SQL PL£¬Embeded SQL PLºÍCompiled SQL PL¡£
Inline SQL PL
ÊÊÓ÷¶Î§£º´¥·¢Æ÷¡¢º¯ÊýºÍ·½·¨£¬Ö§³Ö²¿·ÖSQL PL£¬Ê¹ÓÃʱҪעÒâһЩÏÞÖÆ
Óï·¨¹æÔò£ºBEGIN ATOMIC ... END
Embeded SQL PL
ÊÊÓ÷¶Î§£ºÇ¶Èëʽ£¬Åäº ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ