SQL·ÖÒ³·½·¨
±íÖÐÖ÷¼ü±ØÐëΪ±êʶÁУ¬[ID] int IDENTITY (1,1)
Ò²¿ÉÒÔʹÓÃÁªºÏÖ÷¼ü id+id2+id3+……
1.·ÖÒ³·½°¸Ò»£º(ÀûÓÃNot InºÍSELECT TOP·ÖÒ³)
Óï¾äÐÎʽ£º
SELECT TOP 10 *
from TestTable
WHERE (ID NOT IN
(SELECT TOP 20 id
from TestTable
ORDER BY id))
ORDER BY ID
SELECT TOP Ò³´óС *
from TestTable
WHERE (ID NOT IN
(SELECT TOP Ò³´óС*Ò³Êý id
from ±í
ORDER BY id))
ORDER BY ID
2.·ÖÒ³·½°¸¶þ£º(ÀûÓÃID´óÓÚ¶àÉÙºÍSELECT TOP·ÖÒ³£©
Óï¾äÐÎʽ£º
SELECT TOP 10 *
from TestTable
WHERE (ID >
(SELECT MAX(id)
from (SELECT TOP 20 id
from TestTable
ORDER BY id) AS T))
ORDER BY ID
SELECT TOP Ò³´óС *
from TestTable
WHERE (ID >
(SELECT MAX(id)
from (SELECT TOP Ò³´óС*Ò³Êý id
from ±í
ORDER BY id) AS T))
ORDER BY ID
3.·ÖÒ³·½°¸Èý£º(ÀûÓÃSQLµÄÓαê´æ´¢¹ý³Ì·ÖÒ³)
create procedure SqlPager
@sqlstr nvarchar(4000), --²éѯ×Ö·û´®
@currentpage int, --µÚNÒ³
@pagesize int --ÿҳÐÐÊý
as
set nocount on
declare @P1 int, --P1ÊÇÓαêµÄid
@rowcount int
exec sp_cursoropen @P1 output,@sqlstr,@scrollopt=1,@ccopt=1, @rowcount=@rowcount output
select ceiling(1.0*@rowcou
Ïà¹ØÎĵµ£º
±¾ÎĽ«½éÉÜC#ÏîÄ¿´ò°üÒÔ¼°×Ô¶¯°²×°SQL SeverÊý¾Ý¿â£¬°üÀ¨´´½¨²¿ÊðÏîÄ¿¡¢½«Ö÷³ÌÐòÏîÄ¿µÄÊä³öÌí¼Óµ½²¿ÊðÏîÄ¿ÖС¢´´½¨°²×°³ÌÐòÀà¡¢´´½¨×Ô¶¨Òå°²×°¶Ô»°¿òµÈµÈ¡£
’power by: landlordh
’for 2000,xp,2003
Module uninstall
Sub Main ......
Èç¹ûÏë²éÕÒ“_cs”½áβµÄµÄÕË»§
select * from [user] where loginname like '%_cs'ÊDz»Ðеģ¬_ ±»ÈÏΪÊÇÈÎÒâµÄ×Ö·û£¬
ËùÒÔÐèҪתÒå×Ö·û£¬ÓÐÁ½ÖÖд·¨£º
select * from [user] where loginname like '%[_]cs'
select * from [user] where loginname like '%/_cs' escape'/'
ͨÅä·ûº¬Òå
%
°üº¬Áã¸ö»ò¸ü¶à×Ö· ......
ÉÁ»Ø
1 ÌØÕ÷
ÉÁ»ØÊý¾Ý¿âÖ»ÊÇÂß¼Êý¾ÝÔâµ½ÆÆ»µÊ±µÄÊֶΡ£
ÉÁ»ØÊý¾Ý¿âÈÕÖ¾±ØÐëÔÚÊý¾Ý¿â»Ö¸´ÇøÖд´½¨¡£
ÉÁ»ØÈÕÖ¾²»ÐèÒª¹éµµ£¬²»ÄÜÓÃÓÚÎïÀí»Ö¸´¡£
Ö´ÐÐÉÁ»ØÊý¾Ý¿â²Ù×÷ʱ£¬±³¾°½ø³ÌRVWR¾ÍÆô¶¯ÁË¡£
2 ʹÓÃÉÁ»ØÊý¾Ý¿â
3ÖÖ¹¤¾ß£¬SQL*Plus£¬RMAN£¬OEM¡£
£¨1£©ÒªÇó
ΪÁËʹÓÃÉÁ»ØÊý¾Ý¿â£¬Êý¾Ý¿â±ØÐë´¦Óڹ鵵ÈÕ־ģʽ¡ ......
RepeaterÔÚǰ̨ʹÓñȽÏÁé»î×ÔÓÉ£¬µ«ÓÐÒ»¸öÎÊÌâ¾ÍÊÇRepeater²»Ö§³ÖÖ±½Ó·ÖÒ³£¬Õâ¸öºÜ¶àÈË¿´ÆðÀ´¾ÍÓе㲻ÏëÓÃÁË£¬µ«ÎÒÏë´ó¼Ò¶¼ÖªµÀGridView¿Ø¼þ»òDataGrid¿Ø¼þÔÚÆôÓÃ×Ô´ø·ÖÒ³µÄʱºòÆäʵЧÂÊÊǷdz£µÍµÄ£¬´óµÄ²»Ëµ£¬Ò»µ«µ½ÁË°ÙÍò¼¶Êý¾ÝÒԺ󣬾ͻá¸Ð¾õÊǶàôµÄÍ´¿àºÍÎÞÄÍÁË£¬ËùÒÔ¼´Ê¹ÊÇÓÃDataGrid(GridView)¿Ø¼þ£¬¸ßÊÖÃÇ»¹ÊÇÖ»»á ......
SQLÓï¾äµÄ´¦Àí
ps£ºMSDNÕª
ÓÅ»¯ ÔÚ»ù´¡±íÉÏ£¨²»ÒýÓÃÊÓͼ»òÔ¶³Ì±í£©µÄ SELECT Óï¾ä:SELECT Óï¾äÊǷdzÌÐòÐÔµÄ,ÕâÒâζ×ÅÊý¾Ý¿â·þÎñÆ÷±ØÐë·ÖÎöÓï¾ä£¬ÒÔ¾ö¶¨ÌáÈ¡ËùÇëÇóÊý¾ÝµÄ×îÓÐЧ·½·¨
´¦ÀíÉÏÃæ²½ÖèµÄ×é¼þ³ÆΪ“²éѯÓÅ»¯Æ÷”£º
ÊäÈ룺²éѯ¡¢Êý¾Ý¿â·½°¸£¨±íºÍË÷ÒýµÄ¶¨Ò壩ÒÔ¼°Êý¾Ý¿âͳ¼ÆÐÅÏ¢
& ......