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

SQL Server ÍøÂç±ðÃû

ÍøÂç±ðÃû
-----------------------------------------------------------------------------
ÓÃ;£ºÎªÔ¶³Ì·þÎñÆ÷µÄÒÑÓбíÌí¼ÓÊý¾Ý
-----------------------------------------------------------------------------
²½Ö裺
SQL Server2000/2005
1. ÔËÐпͻ§¶ËÍøÂçʵÓù¤¾ß£¨
£¨1£© SQL Server2000-Client Network Utilily
£¨2£© SQL Server2005-ÅäÖù¤¾ß-SQL ServerConfiguration Manager-SQL Native ClientÅäÖÃ
±ðÃûÒ³--·þÎñÆ÷±ðÃû£º£¨ÈçlogServer£© Á¬½Ó²ÎÊý ·þÎñÆ÷Ãû³Æ£º IPµØÖ·£¨Èç172.16.18.203£© ÍøÂç¿â£ºTCP/IP
2. ÆóÒµ¹ÜÀíÆ÷-Security-linked server
Ìí¼Ó±ðÃû£¬ÈçÉÏlogServer
3. Ìí¼ÓÊý¾Ý
insert into logServer.¿âÃû.dbo.±íÃû select * from ±í£¨ÒìµØ·þÎñÆ÷ÔËÐУ©
Ìáʾ£º²»ÄÜн¨±í
-----------------------------------------------------------------------------


Ïà¹ØÎĵµ£º

²éѯÖظ´¼Ç¼µÄSQLÓï¾ä

SELECT tagid, tagname from uchome_mtag WHERE tagname IN (SELECT tagname from uchome_mtag GROUP BY tagname HAVING (COUNT(tagname) > 1)) ORDER BY tagname ......

SQL distinctÓ÷¨¡¡¼òµ¥group by ÃüÁî


distinctÕâ¸ö¹Ø¼ü×ÖÓÃÀ´¹ýÂ˵ô¶àÓàµÄÖظ´¼Ç¼ֻ±£ÁôÒ»Ìõ£¬µ«ÍùÍùÖ»ÓÃËüÀ´·µ»Ø²»Öظ´¼Ç¼µÄÌõÊý£¬¶ø²»ÊÇÓÃËüÀ´·µ»Ø²»ÖؼǼµÄËùÓÐÖµ¡£ÆäÔ­ÒòÊÇdistinctÖ»ÓÐÓöþÖØÑ­»·²éѯÀ´½â¾ö£¬¶øÕâÑù¶ÔÓÚÒ»¸öÊý¾ÝÁ¿·Ç³£´óµÄÕ¾À´Ëµ£¬ÎÞÒÉÊÇ»áÖ±½ÓÓ°Ï쵽ЧÂʵġ£
ÏÂÃæÏÈÀ´¿´¿´Àý×Ó£º
table±í
×Ö¶Î1      ×Ö¶ ......

¹ØÓÚSql´æ´¢¹ý³Ì


SQL ÖеĴ洢¹ý³Ì£º
1.ÔÚ½¨Á¢´æ´¢¹ý³Ì֮ǰ¼ì²éËùÃüÃûµÄ´æ´¢¹ý³ÌÊÇ·ñÓ¦¾­´æÔÚ¡££¨ÒòΪÈç¹ûͬÃû´æ´¢¹ý³ÌÒѾ­´æÔÚ£¬ÐµĴ洢¹ý³Ì½«²»±»½¨Á¢£©
if exists(select * from sysobject where name='proc name' and type='p')
drop proc proc name
   go
2.¶¨Òå´æ´¢¹ý³Ì
create proc test
@gradel int, --¶¨Òå±äÁ ......

ÅäÖÃsql server 2000ÔÊÐíÔ¶³Ì·ÃÎÊ

 ÅäÖÃsql server 2000ÒÔÔÊÐíÔ¶³Ì·ÃÎÊÊʺϹÊÕÏ:1. ÓÃsqlÆóÒµ¹ÜÀíÆ÷ÄÜ·ÃÎÊsql server 2000(ÒòΪËüÊDzÉÓÃÃüÃû¹ÜµÀ(named pipes)·½Ê½½øÐз½Ê½),µ«ÓÃado.net ·½Ê½(udp)²»ÄÜ·ÃÎÊ.2. ²ÉÓÃado.net·½Ê½²»ÄÜÔ¶³Ì·ÃÎÊ.¹ÊÕϵĿÉÄÜÔ­ÒòÓÐ:1.sql server 2000ûÓа²×°sql server 2000 sp3a¼°ÒÔÉÏÉý¼¶°ü,»¹Î´ÆôÓò¢¿ª·Å1433¶Ë¿Ú(udp);2 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ