Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎÊ´ð£º

ÈçºÎÓÃc#£¬sql2000 ¿ª·¢c/sÏµĹ¤×÷Á÷£¿

±¾ÈËc#ÐÂÊÖ ¿ÉÊÇÒªÇóÒªÓÃc# £¬sql2000¿ª·¢c/sµÄ¹¤×÷Á÷£¬Ò»Í·ÎíË®£¬Çë´ó¼Ò°ïæ°ï棬¸øµã˼·£¬ËµµÄÔ¼¾ßÌåÔ½ºÃ£¬ÎÒÒ²ºÃÍùÄǸö·½Ãæȥѧϰ
http://www.hxzi.com/view/61402.html
B/S°æµÄ£¬»ù±¾Ë¼ÏëÓ¦¸Ã²î²»¶àµÄ¡£¡£ ......

ÇóSQL¡«¡«¡«¡«¡«

×ÜÊý±í
×ֶΠnum,freq
numÊÇËùÊôÆÚµÄ×ÜÊý£¬freqÊǼǼ¸ÃÊýÖµËùÊôÄÄÒ»ÆÚµÄ


ÇøÓò±í
×ֶΠarea_name,tot,freq
ÇøÓòÃû³Æ£¬¸ÃÇøÓòµÄ×ÜÊý£¬ËùÊôÆÚ

Á½ÕÅ±í¿¿freq¹ØÁª£¬ÇÒ²»ÊÇ×ÔÔö×ֶΣ¬²»ÊÇÖ ......

Çó Æ´VB SQL insert into ×Ö·û´®

  INSERT INTO StudAchieve(studID,studName)
  VALUES('2','abc'),('2','bcd'),('2','cde')

  Æ´ÁË°ëÌìÒ²²»¶Ô£¬¼°°¡ ¡£¡£¡£¡£
SQL c ......

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ºÅ