Õâ¸ösql ʲôÎÊÌâ - MS-SQL Server / »ù´¡Àà
declare @t table( a int ,from1 float, to1 float)
insert into @t(a,from1,to1)
select 1,2.22,3.99
union all
select 2,4.00,5.33
select * from @t where 3.998 between from1 and to1
ÎÒÈçºÎÈÃËüÕÒµ½¼Ç¼¡£ËüÓ¦¸ÃÊǵڶþÌõ¼Ç¼²Å¶Ô°É£¡
ÈçºÎдÕâ¸ösql ?
SQL code:
select * from @t where 3.998>=from1 and 3.998<=to1
ÎÒÈçºÎÈÃËüÕÒµ½¼Ç¼¡£ËüÓ¦¸ÃÊǵڶþÌõ¼Ç¼²Å¶Ô°É£¡
Ã÷Ã÷ÊǵÚÒ»Ìõ°É
select * from @t where 3.998 between from1 and to1
2.22,3.99
Õâ¾ÍÊDzéÒ»¸öÖµÊÇ·ñÔÚÒ»¸ö·¶Î§ÖÐ
SQL code:
select * from @t where 3.998>=from1 and 3.998<=to1
Â¥ÉÏÁ½Î»£¬Çë²âÊÔÏ¡£
declare @t table( a int ,from1 float, to1 float)
insert into @t(a,from1,to1)
select 1,2.22,3.99
union all
select 2,4.00,5.33
select * from @t where 3.998>=from1 and 3.998<=to1
select * from @t where 3.998 between from1 and to1
ÎÒ¶¼²éѯ²»µ½¼Ç¼£¿¡¡Ê²Ã´ÔÒòÄØ£¿£¿
SQL code:
declare @t table( a int ,from1 float, to1 float)
insert into @t(a,from1,to1)
select 1,2
Ïà¹ØÎÊ´ð£º
½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì »·¾³ÊÇSQL2000Êý¾Ý¿â
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
Ñ»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)
......
ÎÒÃÇC#×öÒ»¸ö´°Ìå ÍùÊý¾Ý¿âÀï²åÈëÊý¾Ý
SqlConnection cn = new SqlConnection("Data Source=20090713-1752\\SQLEXPRESS;Initial Catalog=goods;Integrated Security=True");
......
ÎÒÊÇÔÚtoadÖÐÊäÈë϶Îsql
declare
TYPE test_rec IS record(
code varchar(10),
name varchar(30)
);
v_book test_rec;
......
sqlµÄÈí¼þÔÚÄÄÀï¿ÉÒÔϰ¡£¡ÔÚÍøÉÏÕÒÁËÂù¶à¶¼Óò»Á˰¡
Ëæ±ã¸ãÒ»D°æ°É£¬
ѸÀ×µÚÒ»¸ö¾Í¿ÉÒÔÓÃ
2000,2005¶¼ÕâÑù
http://119.147.41.16/down?cid=0698C2D64D7D637D90A6D2482298E6717D4F15CD&t=2&fmt=-1 ......
select count(1) from FX_RETURNBOOKCHECKLIST fxreturnbo0_ where fxreturnbo0_.BOOKID='164 ' AND fxreturnbo0_.RETURNID='00025.S0000001'
ÉÏÃæÒ»¸ö¼òµ¥µÄSQL,Ö´ÐÐʱ¼ä2.6à ......