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

sqlserverÖУ¬Óô洢¹ý³Ì·ÖÒ³

´ó¼ÒÓÐûÓÐ ´æ´¢¹ý³Ì·ÖÒ³µÄÀý×Ó£¬¹²Ïíһϣ¬Ð»Ð»£¡£¡£¡
http://wyf.javaeye.com/blog/462396

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


/*--ʵÏÖ·ÖÒ³µÄͨÓô洢¹ý³Ì

    ÏÔʾָ¶¨±í¡¢ÊÓͼ¡¢²éѯ½á¹ûµÄµÚXÒ³
    ¶ÔÓÚ±íÖÐÖ÷¼ü»ò±êʶÁеÄÇé¿ö,Ö±½Ó´ÓÔ­±íÈ¡Êý²éѯ£¬ÆäËüÇé¿öʹÓÃÁÙʱ±íµÄ·½·¨
    Èç¹ûÊÓͼ»ò²éѯ½á¹ûÖÐÓÐÖ÷¼ü,²»ÍƼö´Ë·½·¨
    Èç¹ûʹÓòéѯÓï¾ä,¶øÇÒ²éѯÓï¾äʹÓÃÁËorder by,Ôò²éѯÓï¾ä±ØÐë°üº¬top Óï¾ä

--×Þ½¨ 2003.09(ÒýÓÃÇë±£Áô´ËÐÅÏ¢)--*/

/*--µ÷ÓÃʾÀý
    exec p_show 'µØÇø×ÊÁÏ'

    exec p_show 'select top 100 percent * from µØÇø×ÊÁÏ order by µØÇøÃû³Æ',5,3,'µØÇø±àºÅ,µØÇøÃû³Æ,Öú¼ÇÂë'
--*/
alter Proc p_show
@QueryStr nvarchar(4000),    --±íÃû¡¢ÊÓͼÃû¡¢²éѯÓï¾ä
@PageSize int=10,            --ÿҳµÄ´óС(ÐÐÊý)
@PageCurrent int=1,            --ÒªÏÔʾµÄÒ³
@FdShow nvarchar (4000)='',    --ÒªÏÔʾµÄ×Ö¶ÎÁбí,Èç¹û²éѯ½á¹û²»ÐèÒª±êʶ×Ö¶Î,ÐèÒªÖ¸¶¨´ËÖµ,ÇÒ²»°üº¬±êʶ×Ö¶Î
@FdOrder nvarchar (1000)=''    --ÅÅÐò×Ö¶ÎÁбí
as
set nocount on
declare @FdName nvarchar(250)    --±íÖеÄÖ÷¼ü»ò±í¡¢ÁÙʱ±íÖеıêʶÁÐÃû
    ,@Id1 varchar(20),@Id2 varchar(20)    --¿ªÊ¼ºÍ½áÊøµÄ¼Ç¼ºÅ


Ïà¹ØÎÊ´ð£º

ÇóÒ»ÐÐÒµÍøÔ´Âë(C#+sqlserver)

ÈçÌâ
Ö»ÓÐ100·Ö¸øÁË¡£¡£¡£
ÄĸöÐÐÒµ£¿
ÎÒÏëÍøÉϵÄÔ´Âë¿Ï¶¨²»ÄÜÍêÈ«Âú×ã¸öÈËÏë·¨
×îºó»¹µÃ×Ô¼ºÕû
ÍÆ¼öÒ»¿î×ÔÖú½¨Õ¾Èí¼þ£º·çѶ
C#+SQL
¿ÉÒÔÉè¼Æ³ö±È½ÏÁé»îµÄÍøÕ¾

ʲôÐÐÒµ°¡....

µ½51aspx.co ......

SqlServer »ù´¡ÎÊÌâ

Ô­Êý¾Ý£º



¾­¹ý´ËsqlÓï¾ä²éѯ³öÀ´µÄ½á¹ûÊÇ£º
SQL code:
select Code, Name=stuff((select ','+Name from C t where Code=C.Code for xml path('')), 1, 1, '')
from C




¼ÓÉÏG ......

¼±ÇóÖúSqlserver´æ´í¹ý³Ì

CREATE PROCEDURE [dbo].[getNews]
@News_subject nvarchar(1000) =null,
@News_content nvarchar(max) =null,
@type int,
@FileName varchar(255) =null,
@descriptions nvarchar(1000) =null,
@ ......

sqlserver ÈçºÎµ÷ÊÔ´æ´¢¹ý³Ì

sqlserverÓÐûÓÐÏóoracleÄÇÑù¿ÉÒÔtest´æ´¢¹ý³Ì ,µ¥²½µ÷ÊÔ.²»Ó¦¸ÃûÓаÑ,ÎÒÔõôûÕÒµ½ÄØ? Òª²»È»ÉÔ΢³¤µãµÄ´æ´¢¹ý³ÌÔõôµ÷ÊÔÄØ?
ºÃÏóûÓÐ.

ûÓаÉ

ÓУ¬²éѯ·ÖÎöÆ÷ÖÐÓÒ¼ü´æ´¢¹ý³Ì£¬µ¥²½µ÷ÊÔ

°Ù¶ÈÉÏÈ¥ÕÒһϠ......

sqlserver 1433¶Ë¿ÚµÄÎÊÌâ(ÕûÁËÒ»ÌìÎÞ¹û,¶¥Ò²ÓзÖ)

xp(sp3)ϵͳ°²×°ÁËsqlserver2000£¬sp3£¬sp4²¹¶¡¶¼´òÁË¡£¶øÇÒ±¾»úÒ²ÄÜÁ¬½Ó·ÃÎÊ¡£
ÎÊÌâÊÇ£º
±¾»útelnet ip 1433 ×ÜÊÇÌáʾÁ¬½Óʧ°Ü£¬
¶øÇÒnetstat -naʱ£¬¿´²»µ½1433¶Ë¿Ú±»Õ¼ÓÃ
(¿Ï¶¨µÄÊÇ£º¶Ë¿ÚÊÇ1433£¬¿ªÆ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ