²ÉÓÃvs2005¶Ôsqlserver 2005 SP½øÐе¥²½µ÷ÊÔ
ms sqlserver 2005ÖеĴ洢¹ý³ÌÎÞ·¨ÔÚManagement StudioÖнøÐе÷ÊÔ£¬
µ«¿ÉÒÔͨ¹ýVisual Studio 2005À´¶ÔÖ®½øÐе÷ÊÔ¡££¨¿ÉÉèÖöϵ㣬µ¥²½µ÷ÊԵȣ©
²ÉÓÃVisual Studioµ÷ÊÔ´æ´¢¹ý³ÌµÄ·½·¨ÈçÏ£º
1.Æô¶¯Visual Studio£¨¿É²»´´½¨ÏîÄ¿£©£¬´ò¿ªServer Explorer£¨²Ëµ¥£view-Server Explorer)
2.ÔÚServer ExplorerÖд´½¨Ò»¸öµ½º¬ÓÐÐèµ÷ÊÔµÄÊý¾Ý¿âµÄÁ¬½Ó£¬£¨±ØÐëÌṩ·þÎñÆ÷ÃûÒÔ¼°µÇ¼ÑéÖ¤£©¡£
3.Á¬½Óºó£¬Õ¹¿ª´ËÊý¾Ý¿âµÄÊ÷Ðνṹ£¬²¢Õ¹¿ª´æ´¢¹ý³ÌÎļþ¼Ð£¬ÓÒ»÷Ðèµ÷ÊԵĴ洢¹ý³Ì£¬²¢ÔÚÓÒ¼ü²Ëµ¥ÖÐÑ¡Ôñ“µ¥²½µ÷ÊÔ´æ´¢¹ý³Ì”¼´¿ÉÆô¶¯µ÷ÊÔÁË¡££¨µ÷ÊԵķ½·¨Í¬Visual Studio,¼´Ö§³Ö¶Ïµã£¬µ¥²½µ÷ÊԵȣ©
Ïà¹ØÎĵµ£º
1. ΪºÎʹÓÃÓα꣺
ʹÓÃÓαê(cursor)µÄÒ»¸öÖ÷ÒªµÄÔÒò¾ÍÊǰѼ¯ºÏ²Ù×÷ת»»³Éµ¥¸ö¼Ç¼´¦Àí·½Ê½¡£ÓÃSQLÓïÑÔ´ÓÊý¾Ý¿âÖмìË÷Êý¾Ýºó£¬½á¹û·ÅÔÚÄÚ´æµÄÒ»¿éÇøÓòÖУ¬ÇÒ½á¹û
ÍùÍùÊÇÒ»¸öº¬Óжà¸ö¼Ç¼µÄ¼¯ºÏ¡£Óαê»úÖÆÔÊÐíÓû§ÔÚSQL serverÄÚÖðÐеطÃÎÊÕâЩ¼Ç¼£¬°´ÕÕÓû§×Ô¼ºµÄÒâÔ¸À´ÏÔʾºÍ´¦ÀíÕ ......
ʲôÊÇ´æ´¢¹ý³ÌÄØ£¿
¡¡¡¡¶¨Ò壺
¡¡¡¡½«³£ÓõĻòºÜ¸´ÔӵŤ×÷£¬Ô¤ÏÈÓÃSQLÓï¾äдºÃ²¢ÓÃÒ»¸öÖ¸¶¨µÄÃû³Æ´æ´¢ÆðÀ´, ÄÇôÒÔºóÒª½ÐÊý¾Ý¿âÌṩÓëÒѶ¨ÒåºÃµÄ´æ´¢¹ý³ÌµÄ¹¦ÄÜÏàͬµÄ·þÎñʱ,Ö»Ðèµ÷ÓÃexecute,¼´¿É×Ô¶¯Íê³ÉÃüÁî¡£
¡¡¡¡½²µ½ÕâÀï,¿ÉÄÜÓÐÈËÒªÎÊ£ºÕâô˵´æ´¢¹ý³Ì¾ÍÊÇÒ»¶ÑSQLÓï¾ä¶øÒÑ°¡£¿
¡¡¡¡Microsoft¹«Ë¾ÎªÊ²Ã´»¹ ......
ÈçºÎÔÚSqlserverÖдÓÍⲿXMLÎļþÖжÁÈ¡ÅäÖÃÐÅÏ¢ÄØ£¿¸ÃÎÊÌâÔ´×ÔÒ»¼ÒÆóÒµµÄ±ÊÊÔÐÅÏ¢ÓиС£
Ò»xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="utf-8"?>
<root>
<db name="ClientDB1" datasize="512MB" datagrowth="100MB" logsize="100MB" loggrowth ="50MB">
</db>
<db ......
/*drop table scourse
drop table course
drop table student
drop table major*/
create database db
use db
--רҵ±í
create table major
(spno char(5) not null primary key,
spname varchar(20) not null,
pno char(2) )
--ѧÉú±í
create table student
(sno char(7) not null primary key,
......
sqlServer£º
Ò»´Î²éѯ£¬Êý¾Ý¿âÖ»·µ»ØÒ»Ò³µÄÊý¾Ý¡£¶ø²»ÊÇÈ¡³öËùÓеÄÊý¾Ý¡£
pagesize£º ÿҳÏÔʾ¼Ç¼Êý
cureentpage£ºµ±Ç°Ò³Êý
select * from ( select TOP pagesize * from ( SELECT TOP pagesize*cureentpage * from my_table ORDER BY id ASC ) as amyTable OR ......