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

½²½âSQL ServerÊý¾Ý¿â±»¹ÒÂíµÄ½â¾ö·½°¸

½²½âSQL ServerÊý¾Ý¿â±»¹ÒÂíµÄ½â¾ö·½°¸
http://www.cnhacker.com/Security/Plan/200808/t20080822_6383.html
°¸Àý£ºÒ»¸öÍøÕ¾ÔâÓöÈëÇÖ£¬ÆÆ»µÏ൱ÑÏÖØ£¬SQLÊý¾Ý¿â±»¹ÒÂí£¬ËùÓеıíÀïÃæ´ó²¿·Ö×ֶζ¼±»¶à´ÎÖØ¸´²åÈë¹ÒÂí´úÂ룬²é¿´ÈÕÖ¾£¬»¹ºÃûÓÐÉæ¼°µ½·þÎñÆ÷µÄ°²È«£¬Ö»ÊÇÊý¾Ý¿âÄÇÀï³öÏÖÁ˺ܶàÒì³£¾¯¸æ¶øÒÑ£¬ÍøÕ¾È·Êµ´æÔÚ©¶´
ûÓа취£¬ÎÒÖ»µÃÐÞ¸´Êý¾Ý¿â£¬ÒòΪËûÃÇûÓÐÊý¾Ý¿â±¸·Ý£¬¸ù±¾¾ÍûÓа취»¹Ô­Êý¾Ý¿â°¡£¬ºÎ¿öÁ¬ÊÂÎñÈÕÖ¾¶¼Ã»ÓпªÆô£¬ÊÔׯָ´Á˼¸´Î¶¼²»³É¹¦£¬»Ö¸´Êý¾Ý¿âûÓÐÒ»µãÏ£Íû£¬ÎÒÖ»µÃ¹Ô¹ÔµÄ°ïËûÃÇÇåÀí¹ÒÂí´úÂ룬²»¿ÉÄÜÊÖ¹¤É¾³ý¹ÒÂí´úÂ룬±Ï¾¹Êý¾ÝÌ«´óÁË£¬²»¿ÉÄÜÈ¥Ö±½ÓÐ޸ģ¬Í¨¹ýËÄ´¦ËÑѰµÃµ½ÁËÒ»¸öÃãÇ¿ÓÐЧµÄ½â¾ö°ì·¨£¬Ã¿¸ö±íÀïÃæÈ¥Ö´ÐÐÒ»ÏÂÕâ¸ösqlÓï¾ä£º
update tablename set @ziduanming =replace(cast(@ziduanming as varchar(8000)),’ ’,null)
ÉÏÃæµÄsqlÓï¾ä¿ÉÒÔ¶ÔÓ¦ÐÞ¸Ä±í£¬×Ö¶ÎÃû£¬ºÍÌæ»»ÄÚÈÝ¡£
Æäʵ£¬sqlÊý¾Ý¿â¹ÒÂíÊÇÒ»ÖÖ½ÏеĹÒÂí·½·¨£¬Ö»ÒªÍøÕ¾´æÔÚ×¢È룬²¢ÇÒÁ¬½ÓÊý¾Ý¿âÊÇdb ownerȨÏ޾ͿÉÒÔ½øÐÐÊý¾Ý¿â¹ÒÂí£¬¹À¼ÆÕâ´Î¹¥»÷µÄÁ÷³ÌÓ¦¸ÃÊÇ×Ô¶¯»¯µÄ£¬Í¨¹ýÏȽøµÄɨÃè¼¼ÊõÅúÁ¿ÊÕ¼¯µ½¼¸ÍòÍøÕ¾µÄSQL×¢Èë©¶´£¬Õë¶Ô©¶´¹¥»÷£¬½øÐÐ×Ô¶¯»¯µÄSQL×¢Èë¹ÒÂí¡£Õâ´ÎÓ¦¸ÃÓкܶàÍøÕ¾ÔâÑêÁË£¬asp+mssqlµÄÊÇÖ÷Òª±»¹¥»÷¶ÔÏó!
SQL ServerÊý¾Ý¿â¹ÒÂíµÄ½â¾ö°ì·¨£º
ÕýÈ·ÇåÀíľÂí£¬×¢ÒâÊý¾Ý¿â²»ÄÜËæ±ãÐ޸Ļòɾ³ý£¬±»¹ÒÉÏÂíºó£¬¸üÐèÒª½÷É÷µÄ²Ù×÷¡£½¨Ò飬Ïȱ¸·ÝÈ»ºóÔÙСÐÄÇåÀí¡£
Èç¹ûÒÔǰûÓб¸·ÝµÄ»°£¬¾ÍÀûÓÃÎÒÉÏÃæµÄsqlÃüÁî½øÐÐÐÞ¸´£¬
ÈçºÎÔ¤·ÀSQLÊý¾Ý¿â¹ÒÂí£º
1¡¢ÇåÀíÍøÕ¾ÉÏËùÓÐ×¢Èëµã¡£
2¡¢ÎªÍøÕ¾ÅäÖÿɿ¿µÄ·À×¢Èë³ÌÐò¡£
3¡¢×îºÃÔÚÍøÕ¾Ô´ÂëÖÐ×öºÃ¹ýÂË£¬ÔÚÊý¾Ý¿âÖÐÏÞÖÆ×Ö·ûµÄÀàÐͺͳ¤¶È¡£
4¡¢Ñø³É¾­³£±¸·ÝÊý¾Ý¿âµÄϰ¹ß¡£´ó¼Ò¿ÉÄÜÎÞ·¨±£Ö¤ÌìÌ챸·ÝÊý¾Ý¿â£¬µ«Ò²»á±£Ö¤Ã¿Öܱ¸·ÝÒ»´Î£¬Èç¹ûÓÐʱ¼ä±£Ö¤ÌìÌ챸·ÝÊý¾Ý¿â¡£
5¡¢×îºÃÊÇÇëרҵµÄÍøÕ¾°²È«¹«Ë¾£¬¶ÔÄúµÄÕ¾ºÍ·þÎñÆ÷×ö³¹µ×µÄ°²È«ÆÀ¹À¡£


Ïà¹ØÎĵµ£º

»ùÓÚSQLµÄ·ÖÒ³

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Öв»Ê¶±ð£¬Ð趨Òå±äÁ¿À´Ìæ»»¡· ......

SQL¾«»ªÊÕ¼¯

order by µÄÊýÖµÐÍÁé»îʹÓÃ
select * from table_a where id=p_id order by decode(º¯Êý,'asc',1,'desc',-1)*jsny;
¿ØÖÆÊÔͼµÄ·ÃÎÊʱ¼ä£º
6.create view ...
as
select ... from where exists(select x from dual where sysdate>=8:00am and sysdate<=5:00pm)
ÃîÓÃdecodeʵÏÖÅÅÐò
select * from tabnam ......

ORACLE SQL ÓÅ»¯

http://kang275284.javaeye.com/blog/154331
Ò»¡¢ ÏȽéÉÜÒ»ÏÂoracle
µÄSGA£ºÊý¾Ý¿âµÄϵͳȫ¾ÖÇø£¬SGAÖ÷ÒªÓÉÈý²¿·Ö¹¹
³É£º¹²Ïí³Ø¡¢Êý¾Ý»º³åÇø¡¢ÈÕÖ¾»º³åÇø¡£
1¡¢ ¹²Ïí³ØÓÖÓÉÁ½²¿·Ö¹¹³É£º¹²ÏíSQL
Çø
ºÍÊý¾Ý×ֵ仺³åÇø¡£¹²ÏíSQL
Çø×¨ÃÅ´æ·ÅÓû§SQL
Ãü
Áoracle
ʹÓÃ×î½ü×îÉÙʹÓõÈÓÅÏȼ¶Ëã·¨À´¸üи²¸Ç£ ......

sql server Öг£ÓõÄÈÕÆÚº¯Êý

´ÓdateTimeÀàÐÍÊý¾ÝÖлñÈ¡¼¾¶È£º
select   cast(datepart(q,sign_date)   as   varchar(2))+'¼¾¶È'    
Ò».sql serverÈÕÆÚʱ¼äº¯Êý
1.   µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
     select getdate()  
2. dateadd   ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼ä ......

SQLÃæÊÔÌâС½á

 
ÎÒÏëÃæÊÔ¹ýÈí¼þ¿ª·¢µÄÅóÓѶ¼»áÅöµ½sql·½ÃæµÄÃæÊÔÌ⣬Õâ¸ö¿ÉÒÔ˵ÊÇÃæÊԱؿ¼µÄ¡£ÕâÀïÄü¸¸öÀý×Ó¿ªÍØÒ»ÏÂ˼·¡£
1.      
ÓÐÕâÑùÒ»Õűí
½ÌʦºÅ
ÐÇÆÚ
ÊÇ·ñÓпÎ
1
1
ÓÐ
2
3
ÓÐ
1
2
ÓÐ
1
2
ÓÐ
ÒªµÃ³öÕâÑùµÄÊý¾Ý£º
ÐÕÃû
ÐÇÆÚÒ»
ÐÇÆÚ¶þ
ÐÇÆÚÈý
ÐÇÆÚËÄ
ÐÇÆÚÎå
1
1 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ