·ÀÖ¹SQL×¢Èë
Ò»¡¢Ê¹ÓòÎÊý»¯ÊäÈë¡£´æ´¢¹ý³ÌÀᄀÁ¿±ÜÃâÓï¾äÆ´½Ó¡£
¶þ¡¢¶ÔÓÚһЩÊý¾Ý¿â£¬±ØÐëÉèÖÃȨÏÞ£¬ÉõÖÁÉèÖõ½×ֶΡ£
Èý¡¢Ê¼ÖÕͨ¹ý²âÊÔÀàÐÍ¡¢³¤¶È¡¢¸ñʽºÍ·¶Î§À´ÑéÖ¤Óû§ÊäÈë¡£
ËÄ¡¢¹ýÂËÃô¸Ð×Ö·û¡£
Function ReplaceStr(Str)
Str=Trim(Str)
Str=Replace(Str,"'","'")
Str=Replace(Str,";",";")
Str=Replace(Str," "," ")
Str=Replace(Str,"""","”")
Str=Replace(Str,"%","")
Str=Replace(Str,"__","")
Str=Replace(Str,"--","--")
Str=Replace(Str,"\","\")
Str=Replace(Str,"?","")
Str=Replace(Str,vbcrlf,"<br>")
Str=Replace(str,"0x0020","")
ReplaceStr=Str
End Function
Ïà¹ØÎĵµ£º
SQL×¢Èë¹¥»÷·À·¶¼¼ÇÉ
Ò»°ãµÄSQL×¢Èë¹¥»÷¶¼ÊÇͨ¹ý¹¹½¨Ò»Ìõ¸´ÔÓµÄsqlÓï¾ä£¬
ͨ¹ýÍøҳ©¶´À´Ö´ÐÐsqlÓï¾ä£¬´ïµ½¹¥»÷Êý¾Ý¿âµÄÄ¿µÄ¡£
Èçͨ¹ýÎÄÕÂIDÀ´²éѯijһƪÎÄÕµÄÍøÒ³£¬
ͨ³£²ÉÓõÄsqlÓï¾äΪ£º
sql="select top 1 * from articles where articId="&request("id")
ÄÇô¿ÉÒÔ¼òµ ......
(1)¹ØÓÚ´æ´¢¹ý³Ì·µ»ØÖµÎÊÌ⣨output,ruturn£©
output´æ´¢¹ý³Ì£º
alter proc usp_update
@count int output
as
set @count=(select count(*) from stu)
return´æ´¢¹ý³Ì£º
alter proc usp_update
as
declare @count int
set @count=(select count(*) from stu)
r ......
SQLº¯ÊýÖ®ËÄÉáÎåÈ루ת×Ôhttp://ln1058.javaeye.com/blog/191502£©
ÎÊÌâ1£º
SELECT CAST('123.456' as decimal) ½«»áµÃµ½ 123£¨Ð¡ÊýµãºóÃæµÄ½«»á±»Ê¡ÂÔµô£©¡£
Èç¹ûÏ£ÍûµÃµ½Ð¡ÊýµãºóÃæµÄÁ½Î»¡£
ÔòÐèÒª°ÑÉÏÃæµÄ¸ÄΪ
SELECT CAST('123.456' as decimal(38, 2)) ===>123.46
×Ô¶¯ËÄÉáÎåÈëÁË£ ......
---//´´½¨·ÖÇø
CREATE PARTITION FUNCTION MarketInfo_Bak_partfunc(int)
AS RANGE RIGHT
FOR VALUES (10000,25000,40000)
--//´´½¨·ÖÇø¼Ü¹¹
CREATE PARTITION SCHEME MarketInfo_Bak_partscheme
¡¡¡¡AS PARTITION MarketInfo_Bak_partfunc
¡¡¡¡TO (fg1, fg2, fg3, fg4) --//fg1...fg4Îļþ×éÃû
--//¶Ô±í½ø ......