ÔÚSQL Server ɾ³ýÖØ¸´Êý¾Ý
ɾ³ýÊý¾Ý¿â±íÖÐijһ×ֶεÄÖØ¸´¼Í¼£¬Ö»Ïë±£ÁôÒ»Ìõ¼Ç¼¿ÉÓÃÒÔÏ·½·¨£º
Ö´ÐÐÒÔÏÂÓï¾ä£º
declare @max integer,@id varchar(18) --´Ë´¦±äÁ¿ÀàÐ͸ù¾Ý×Ö¶ÎÀàÐÍÉèÖÃ
declare cur_rows cursor local for select ×Ö¶Î,count(*) from ±íÃûgroup by ×Ö¶Î having count(*) > 1
open cur_rows
fetch cur_rows into @id,@max
while @@fetch_status=0
begin
select @max = @max -1
set rowcount @max
delete from ±íÃûwhere ×Ö¶Î = @id
fetch cur_rows into @id,@max
end
close cur_rows
set rowcount 0
Ïà¹ØÎĵµ£º
--¸Ã±í±£´æ½á¹û
create table c(c1 tinyint, c2 tinyint, c3 tinyint, c4 tinyint, c5 tinyint, c6 tinyint, c7 tinyint, c8 tinyint, c9 tinyint, c10 tinyint, c11 tinyint, c12 tinyint, c13 tinyint, c14 tinyint, c15 tinyint, c16 tinyint, c17 tinyint, c18 tinyint, c19 tinyint, c20 tinyint, c21 tinyint, c22 t ......
dim conn,connstr
Set conn = Server.CreateObject("ADODB.Connection")'´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó¶ÔÏóconn£¬·½±ãºóÃæµ÷ÓÃ
connstr="Provider=SQLOLEDB;Data Source=(local);Initial Catalog=111;User ID=sa;Password=1234;" '´´½¨Ò»¸öÊý¾Ý¿âµÄrecordset¶ÔÏ󣬷½±ãÒÔºóµ÷ÓÃ
conn.Open connstr'´ò¿ªÊý¾Ý¿â ......
¶ÔÕâ¸ö½øÐÐÓÅ»¯
select n5001 Ãŵê,n5002 ²¿ÃÅ,n5004 С·ÖÀà,n5019 ÉÌÆ·±àÂë,c01d21 ÉÌÆ·Ãû³Æ,
nvl(xse,0)-nvl(dzxs,0) ÏúÊÛ,
mle ëÀû,
nvl(xl,0)-nvl(dzsl,0) ÏúÁ¿
from
(select n5001,n5002,n5004,n5019,sum(n5011) xse,sum(n5016) mle,sum(n5023) xl
from n50
where to_char(n5010,'yyyymmdd')>='20 ......
select top PageSize * from ±í
where Ìõ¼þ and id not in
(select top PageSize*(CurrentPageIndex-1) id from ±í where Ìõ¼þ order by ÅÅÐòÌõ¼þ)
order by ÅÅÐòÌõ¼þ
¡¶PageSize ÊÇGridViewÖÐÿҳÏÔʾµÄÐÅÏ¢ÌõÊý£¬PageSize*(CurrentPageIndex-1) ÔÚSQLÖв»Ê¶±ð£¬Ð趨Òå±äÁ¿À´Ìæ»»¡· ......
http://kang275284.javaeye.com/blog/154331
Ò»¡¢ ÏȽéÉÜÒ»ÏÂoracle
µÄSGA£ºÊý¾Ý¿âµÄϵͳȫ¾ÖÇø£¬SGAÖ÷ÒªÓÉÈý²¿·Ö¹¹
³É£º¹²Ïí³Ø¡¢Êý¾Ý»º³åÇø¡¢ÈÕÖ¾»º³åÇø¡£
1¡¢ ¹²Ïí³ØÓÖÓÉÁ½²¿·Ö¹¹³É£º¹²ÏíSQL
Çø
ºÍÊý¾Ý×ֵ仺³åÇø¡£¹²ÏíSQL
Çø×¨ÃÅ´æ·ÅÓû§SQL
Ãü
Áoracle
ʹÓÃ×î½ü×îÉÙʹÓõÈÓÅÏȼ¶Ëã·¨À´¸üи²¸Ç£ ......