¸÷λ´óÏÀ£ºÎÒÏÖÔÚÓÐÒ»¸öÊý¾Ý¿â£¬ËüÀïÃæÓÐÒ»ÕÅ±í¡£ÕâÕűíÀï´æ·ÅÁËÉÌÆ̵ÄÃæ»ýµÈÐÅÏ¢¡£ÎÒÏÖÔÚÏë²éѯ³öÉÌÆÌÃæ»ýÔÚ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)
select * from tb where cast(col as int) between 30 and 50 select * from tb where convert(int , col) between 30 and 50