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

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

¸÷λ´óÏÀ£ºÎÒÏÖÔÚÓÐÒ»¸öÊý¾Ý¿â£¬ËüÀïÃæÓÐÒ»ÕÅ±í¡£ÕâÕűíÀï´æ·ÅÁËÉÌÆ̵ÄÃæ»ýµÈÐÅÏ¢¡£ÎÒÏÖÔÚÏë²éѯ³öÉÌÆÌÃæ»ýÔÚ30-50Ö®¼äµÄ£¬µ«ÊDZíÀïµÄÊý¾ÝÈ«²¿ÎªcharÀàÐ͵ģ¬ÎÒ¸ÃÔõô½øÐÐת»»±È½Ï¡£
SQL code:
where cast(col as dec(18,2)) between 30 and 50


SQL code:
cast(ÉÌÆ·Ãæ»ý as int) between 30 and 50


SQL code:

cast colname as numeric(10,2)



ÒýÓÃ
¸÷λ´óÏÀ£ºÎÒÏÖÔÚÓÐÒ»¸öÊý¾Ý¿â£¬ËüÀïÃæÓÐÒ»ÕÅ±í¡£ÕâÕűíÀï´æ·ÅÁËÉÌÆ̵ÄÃæ»ýµÈÐÅÏ¢¡£ÎÒÏÖÔÚÏë²éѯ³öÉÌÆÌÃæ»ýÔÚ30-50Ö®¼äµÄ£¬µ«ÊDZíÀïµÄÊý¾ÝÈ«²¿ÎªcharÀàÐ͵ģ¬ÎÒ¸ÃÔõô½øÐÐת»»±È½Ï¡£

select * from tb where cast(col as int) between 30 and 50
select * from tb where convert(int , col) between 30 and 50



Ïà¹ØÎÊ´ð£º

csvÎļþת»»³Ésqlµ¼Èëµ½Êý¾Ý¿â£¬Ã»ÓÐÊý¾ÝΪºÎ£¿

Ö´ÐеÄ˳Ðò£º
1£©Îļþä¯ÀÀ¿ò£¨Ñ¡ÔñÎļþʹÓã©
Ñ¡ÔñºÃÎļþºó
µã»÷Ò»¸öµ¼Èë°´Å¥µÄʱºò £¬°ÑÉÏÃæÉÏ´«¿òÀïµÄcsvÎļþÒÔÒ»¸öIDΪÎļþÃû£¬ÉÏ´«µ½**/**Îļþ¼ÐÏÂ
2£©¶ÁÈ¡Õâ¸öÎļþ¼ÐϵÄcsvµÄÎļþ£¬×ª»»³Ésql
3 ......

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ûÔõôÓùý¡£Ò²Ã»Óа²× ......

SQLÄܽøÐжþ½øÖƵÄɸѡÂ𣿠- MS-SQL Server / »ù´¡Àà

ÎÒÓÐÒ»¸ö×Ö¶ÎÊÇ varchar(1) ÀàÐÍ£¬¶þ½øÖƱíʾҲ¾ÍÊÇ8λµÄ ¡®0000 0000¡¯
±ÈÈçÕâ¸öʱºòÎÒÐèҪɸѡ³öÕâ¸ö×Ö¶ÎΪËùÓÐµÄ ¡®0000 0100¡¯µÄÐУ¬ÇëÎÊSQLÄÜʵÏÖÕâÑùµÄ¡°Î»¡±µÄɸѡÂð£¿
лл~~~

ÓÐλ²Ù×ݺ¯ÊýÂ𣿲»ÐоÍ× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ