ÇóÖúÒ»¾äSQLÓï¾ä
Êý¾ÝÀàÐÍ£º
Code char(6)
CreateTime datetime
Price float
Êý¾ÝÈçÏ£º
Code CreateTime Price
031021 2008-10-17 15:00:15 3.58
031021 2008-10-17 15:00:16 5.53
031022 2008-10-17 15:00:17 4.54
031022 2008-10-17 15:00:18 3.51
031022 2008-10-17 15:00:19 3.52
031023 2008-10-17 15:00:20 2.50
031023 2008-10-17 15:00:21 4.53
031024 2008-10-17 15:00:22 3.55
031024 2008-10-17 15:00:23 3.55
031024 2008-10-17 15:00:24 5.57
ÎÒ²éѯ
SELECT * from Table Where Price between 4 and 5
³öÀ´µÄ½á¹ûÊÇ
031022 2008-10-17 15:00:17 4.54
031023 2008-10-17 15:00:21 4.53
ÎÒÏëÒªµÄ½á¹ûÊÇ
031022 2008-10-17 15:00:18 3.51
¾ÍÊÇ˵Ҫ·ûºÏ²éѯµÄÌõ¼þµÄÏÂÒ»Ìõ£¬Ëû±¾ÌõÌø¹ý£¬
×¢Ò⣺031024 2008-10-17 15:00:22 3.55 (ÕâÌõÒ²ÊÇ4.53µÄÏÂÒ»Ìõ£¬µ«ÊÇÒòΪ²»ÊÇͬһ¸öCodeËùÒԾͲ»ÄÜÒª)
ÇëÎÊÕâ¾äSQLÒªÔõôд£¬Ð»Ð»£¡
2005£¿
------------------------------------------------------------------------
-- Author : HappyFlyStone
-- Date : 2009-10-12¡¡
-- Version: Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
--&nbs
Ïà¹ØÎÊ´ð£º
listidÊÇintÊý¾Ý
declare @listid nvarchar(100)
set @listid='(1,2,3,7,9,10)'
select * from forums where listid in(@listid)ʱÌáʾÈçÏ´íÎó£º
ÔÚ½« nvarchar Öµ '(1,2,3,7,9,10)' × ......
create trigger TR_Delete_pm_WorkCard
on pm_WorkCard
for delete
as
if @@rowcount=0 return
begin tran
update pm_PlanEntry
set FDispatchQty=t4.FDispatchQty - t1.FDispat ......
INSERT INTO StudAchieve(studID,studName)
VALUES('2','abc'),('2','bcd'),('2','cde')
Æ´ÁË°ëÌìÒ²²»¶Ô£¬¼°°¡ ¡£¡£¡£¡£
SQL c ......
±ÈÈç ÓÐÒ»×Ö¶ÎΪ£º
Num
6111
6201
6520
65121
60087
46300
ÎÒÏë°Ñ6¿ªÍ·µÄÈ«¶¼Ìæ»»³É5¿ªÍ·
×¢ÒâÕâÊDZíÀïµÄÊý¾Ý£¬ÎÒÏëÓÃSQLÓï¾äʵÏÖÌæ»»
SQL code:
update tb set
num = s ......
ÏÖÔÚÓбíA£¨barcode varchar2£¬length number£©£¬B£¨barcode varchar2£¬serial number£©ÆäÖÐbarcode¹ØÁªA:BΪ1£ºn
ÓÐÈçÏÂsqlÓï¾ä
insert into a values('b1',10)
insert into a values( ......