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

sql×Ö·û´®Ìæ»»(ÓеãÌôÕ½···)

±ÈÈç ÓÐÒ»×Ö¶ÎΪ£º
Num
6111
6201
6520
65121
60087
46300

ÎÒÏë°Ñ6¿ªÍ·µÄÈ«¶¼Ìæ»»³É5¿ªÍ·

×¢ÒâÕâÊDZíÀïµÄÊý¾Ý£¬ÎÒÏëÓÃSQLÓï¾äʵÏÖÌæ»»
SQL code:
update tb set
num = stuff(num,1,1,'5')
where num like '5%'


SQL code:
update tb
set num=stuff(ltrim(num),1,1,'5')
where ltrim(num) like '6%'


SQL code:
-------------------------------------
-- Author : liangCK Áº°®À¼
-- Comment: СÁº °® À¼¶ù
-- Date : 2009-10-12 19:38:25
-------------------------------------

--> Éú³É²âÊÔÊý¾Ý: @tb
DECLARE @tb TABLE (Num int)
INSERT INTO @tb
SELECT 6111 UNION ALL
SELECT 6201 UNION ALL
SELECT 6520 UNION ALL
SELECT 65121 UNION ALL
SELECT 60087 UNION ALL
SELECT 46300

--SQL²éѯÈçÏÂ:

update @tb set
num = stuff(num,1,1,'5')
where num like '6%'

SELECT * from @tb

/*
Num
-----------
5111
5201
5520
55121
50087
46300

(6 ÐÐÊÜÓ°Ïì)


*/


Ò»ÑùµÄÊÖÎó.½«WHEREµÄ5¸ÄΪ6

»òÕßSQL code:
updat


Ïà¹ØÎÊ´ð£º

ÃÅÍ⺺ÇóÖú...¹ØÓÚºǫ́+SQL+ASP

....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷Ô­À´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......

sqlÓï¾äÎÊÌâ

ÓÐÒ»¸ö±íAA
name  tj
1    a
1    b
1    c
2    a
2    d
3    b
ÒªÇóµ±tj×ֶεÄÖµ¼ÈµÈÓÚaÓÖµÈÓÚcʱ£¨tj = ¡®a¡ ......

sql server 2000 µÇ¼ʧ°Ü

µã»÷¡°·þÎñ¹ÜÀíÆ÷¡±£¬µã»÷¡°¿ªÊ¼/¼ÌÐø¡±£¬×ÜÊÇÏÔʾ¡°ÓÉÓڵǼʧ°Ü¶øÆô¶¯·þÎñ¡±£¬È»ºóÔٴγö´í£¬²»Äܹ»½øÈ룬Ҳ²»Äܹ»²é¿´ÊôÐÔ£¬ÇëÎÊ´ó¼Ò¸ÃÔõô°ì£¿

ÎÒÊDzſªÊ¼Ñ§Ï°Êý¾Ý¿â£¬ÇëÎÊ´ó¼ÒÓÐûÓÐʲôºÃһЩµÄ½¨Òé»òÕ ......

sql server left join ÎÊÌâ

sqlÓï¾ä£º
select loan_plan_id,l_collect_plan.loan_id,l_collect_detail.collect_isfinished from l_collect_plan
left join l_collect_detail on l_collect_plan.return_times=l_collect_detail.collect_vo ......

sqlÁ½Áкϲ¢ÏÔʾ£¿

²éѯ½á¹û¼¯£º
ps  online  totle
a    0      10
b    1      11
c    5        8
ÏëÏÔʾ³ÉÕâÑù ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ