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

sqlserver·ÖÒ³´æ´¢¹ý³ÌµÄÓ÷¨

create proc P_QuerySplit
 @sqlscript varchar(20),         --±íÃû/SQLÓï¾ä
 @pageSize int,                  --ÿҳ¼Ç¼Êý
 @pageIndex int,                 --µ±Ç°Ò³
 @totalCount int output,         --×ܼǼÊý
 @totalPage int output        --×ÜÒ³Êý
as
  declare @v_sqlscript varchar(20)
  declare @v_PageSize int
  declare @v_PageIndex int
  declare @v_SQL_Count int
  declare @v_SQL varchar(4000)
  declare @v_StartIndex int
  declare @v_EndIndex int
 set @v_PageSize=@pageSize
 --ÿҳ¼Ç¼Êý
if @v_PageSize=0
 set @v_PageSize=1
print @v_pageSize
--²éѯ×ܼǼÊý
select @v_SQL_Count=count(1) from stuInfo
set @totalCount=@v_SQL_Count
print @totalCount
--×ÜÒ³Êý
set @totalPage=ceiling(@totalCount/@v_PageSize)
--µ±Ç°Ò³
if(@pageIndex=1 or @pageIndex<1)
begin
 set @pageIndex=1
 set @v_PageIndex=@pageIndex
 set @v_StartIndex=0
 set @v_EndIndex=ceiling(@v_pageIndex*@v_pageSize)
print    @pageIndex
 
end
if @pageIndex>1
begin
 set @v_PageIndex=@pageIndex
 set @v_StartIndex=ceiling((@v_PageIndex-1)*@v_PageSize)
 set @v_EndIndex=ceiling(@v_pageIndex*@v_pageSize)
print  @pageIndex
 
end
 
 
set @v_sqlscript=@sqlscript
--µ±Ç°Ò³µÄ¼Ç¼
--  set @v_SQL='select top'+str(@v_PageSize)+' * from '+ @v_sqlscript+
--' where (id>(select max(id) from (select top '+str(@v_startIndex)+' id
--from '+ @v_sqlscript +' order by id) a)) order by id'
--exec (@v_SQL)
 set @v_SQL='select * from (select row_number() over(order by id desc) as rownum,
* from '+@v_sqlscript+') as t where t.rownum>'+str(@v_StartIndex)+' a


Ïà¹ØÎĵµ£º

PowerdesignerµÄÄæÏò¹¤³Ì½«sqlserverÊý¾Ý¿âÉú³ÉPDM

»·¾³£ºvs2005+sqlserver2005+PowerDesigner 12
 
´ò¿ªPowerDesigner 12(ÒÔϼò³Æpd)£¬Ð½¨pdm¹¤³Ì£¬ÈçͼËùʾ£º
 
×¢£ºdbmsÑ¡ÔñÄúÄ¿Ç°ÐèҪת»»µÄÀà±ð£¬ÎÒÓõÄÊÇsqlserver2005¡£
 
È»ºóÑ¡Ôñ²Ëµ¥¡¶Êý¾Ý¿â¡·¡¶ÏµÍ³DSN¡·£¬Ñ¡Ôñ»òÕßÌí¼ÓÄúÐèÒªµÄÊý¾Ý¿â£¬ÎÒÕâÀïÑ¡ÔñµÄÊÇsql server¡£ÈçͼËùʾ£º
 
½¨ºÃ ......

SQLSERVERÊý¾Ý¿â»¹Ô­ÊµÕ½

1£©Ð½¨Êý¾Ý¿âRESTORE
2£©ÔÚ¸ÃÊý¾Ý¿âÉÏÑ¡Ôñ£ºÈÎÎñ->»¹Ô­->Êý¾Ý¿â
3£©ÔÚ»¹Ô­Êý¾Ý¿â-RESTOREµÄ¶Ô»°¿òÖÐ
   Ä¿±êÊý¾Ý¿âÊÇRESTORE
   Ö¸¶¨ÓÃÓÚ»¹Ô­µÄ±¸·Ý¼¯µÄÔ´ºÍλÖÃ->Ô´É豸->Ñ¡Ôñ×îºóÒ»¸öÍêÈ«µÄ±¸·ÝBAKÎļþ
   ¹´Öл¹Ô­CheckBox
4£©Ñ¡Ôñ×óÉϽǵÄÑ¡Ïî
   ÔÚ»¹Ô­Ñ ......

´¿JSP·ÖÒ³´úÂëÖ®sqlserver2005/2008

ÉÏһƪ·ÖÒ³ÎÄÕ£¬ÊÇÓÃÓÚmysql£¬ÉÔ΢ÐÞ¸ÄÏ£¬ÓÃÓÚSqlserver2005/2008£¬Ã»ÓÐÒì³£´¦Àí¡£Ã»Óп¼ÂÇÐÔÄܵȡ£
ÏÖ½«´úÂëÌù³ö£¬ÒÔ¹©³õѧÕ߲ο¼£º
×¢£ºÑûÔÂʹÓû·¾³Eclipse 3.4.2+Tomcat 6.18+Sqlserver2005 sp3µ÷ÊԳɹ¦¡£
Ò³ÃæpagelistDemo.jspÄÚÈÝ£º
Code
<%@ page language="java" contentType="text/html; ......

SQLServer 2005 ¼¯ÈºµÄÅäÖà ʵÏÖË«»úÈȱ¸

   MS Sqlserver 2005 ¼¯ÈºÊÇÖ¸Êý¾Ý¿â¸ß¿ÉÓÃÐÔ¼¯Èº£¬ÄÜʵÏÖͨ³£Ëù˵µÄ“Ë«»úÈȱ¸”£¬¼´µ±Ò»Ì¨·þÎñÆ÷Í£µôÊý¾Ý¿â·þÎñ¿ÉÒÔ×Ô¶¯×ªÒƵ½Áíһ̨·þÎñÆ÷¡£
       »·¾³ÒªÇó£º
       1¡¢windows 2003 serverÆóÒµ°æ
    &nb ......

SQLServer¸ß¼¶±à³Ì

         ±¾ÆªÄÚÈÝϵÊôSQLServer¸ß¼¶±à³Ì£¬ÊÊÓÃÓÚÓûÌá¸ß×Ô¼ººÍ¸´Ï°»òÓ¦¸¶ÃæÊÔµÄÅóÓÑÔĶÁ£¬Í¬Ê±±¾ÈËѧϰ²»¾Ã£¬ÔÚ×ܽáºÍ¹éÄÉʱ´íÎóºÍ²»Ç¡µ±Ö®´¦ÔÚËùÄÑÃ⣬»¹ÇëÖ¸³öÆäÖБ¶ËÄß’£¬ÓèÒÔÍêÉÆ¡£
±í1:Users
USE [Wish]
GO
/****** ¶ÔÏó: Table [dbo].[Users] ½Å±¾ÈÕÆÚ: ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ