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

SQL²éѯÏÔʾÎÊÌâ(2) - MS-SQL Server / »ù´¡Àà

ÓÐÒ»¸ö×Ö¶ÎA £¬ÀïÃæÊǾßÌåÊÇÊý×Ö£¬
ÎÒÏëÈÃËû²éѯÏÔʾʱ¼ÓÅÐ¶Ï ±ÈÈç £º0-100 ÏÔʾ³É£º1 £»101-200 ÏÔʾ³É£º2  
ÈçºÎʵÏÖ£¬²»Ê¤¸Ð¼¤£¡£¡£¡


ÒýÓÃ
ÓÐÒ»¸ö×Ö¶ÎA £¬ÀïÃæÊǾßÌåÊÇÊý×Ö£¬
ÎÒÏëÈÃËû²éѯÏÔʾʱ¼ÓÅÐ¶Ï ±ÈÈç £º0-100 ÏÔʾ³É£º1 £»101-200 ÏÔʾ³É£º2
ÈçºÎʵÏÖ£¬²»Ê¤¸Ð¼¤£¡£¡£¡

select case when col between 0 and 100 then 1 when col between 100 and 200 then 2 end from tb

SQL code:
select case when '0-100' then 1 else 0 end as'col1',
case when '101-200' then 2 else 0 end as 'col2'
from tb


SQL code:
select case when col between 0 and 100 then 1
when col between 100 and 200 then 2 end
from tb


select *,(select count(1) from tb where right(A,len(A) - charindex('-',A))<=right(t1.A,len(t1.A) - charindex('-',t1.A))) 
from tb t1 join tb t2 on right(t1.A,len(t1.A) - charindex('-',t1.A))+1 = left(t2.A,charindex ('-',t2.A) -1)



Ïà¹ØÎÊ´ð£º

sql - MS-SQL Server / ÒÉÄÑÎÊÌâ

sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔÏ°¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»ÁË°¡

Ëæ±ã¸ãÒ»D°æ°É£¬

ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù

http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......

sql ÎÊÌâ - MS-SQL Server / »ù´¡Àà

ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......

Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿ - MS-SQL Server / »ù´¡Àà

Ôõô°ÑMDFÊý¾Ýתµ½MySQL£¿
ÖÁÉٵø½¼Óµ½sqlserverÉÏ

¾ßÌåÔõôŪ°¡ ÎҵıÏÒµÉè¼ÆµÄÊý¾Ý¿âÊÇ´ÓÍøÉÏdownÏÂÀ´µÄ£¿£¿

Ä㻹²»ÈçÖ±½ÓÓÃsqlserverÄØ

º¯Êý¡¢´æ´¢¹ý³Ì¶¼µÃ¸ÄÁË¡£

sqlserverûÔõôÓùý¡£Ò²Ã»Óа²× ......

ASPÒ³ÃæÎÞ·¨´ò¿ªÇóÖú£¡ - MS-SQL Server / »ù´¡Àà

¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......

Accessͨ¹ýSqlÓï¾ä´´½¨Êý¾Ý¿â - .NET¼¼Êõ / C#

ÔÚAccessµÄ²éѯÖÐÖ´ÐÐÏÂÃæµÄÓï¾ä,ÎÞЧ,ÌáʾÆÚ´ýselect ,updata ,...
CreateTble C=Answer N="»ØÌû±í"
(
  C=ID T="INTEGER" P=No M=No N="±àºÅ" Z=false,
  C=Ques ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ