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

sql²éѯÒÉÎÊ

±íÖа´datadate,tradeidΪÖ÷¼ü£¬Ò²¾ÍÊÇ˵tradeid»áÖظ´³öÏÖÔÚ²»Í¬ÌìÖУ¬Í¬Ò»ÌìµÄtradeidÊDz»Í¬µÄ¡£ÏÖÔÚÎÒÏ£ÍûÈ¡Ò»¶Îʱ¼ä·¶Î§ÄÚ²»Öظ´µÄtradeid£¬ÇÒֻҪÿ¸ötradeidµÄ×îºóÒ»´Î³öÏÖµÄÄÇÌõ¡£sqlÓï¾ä¸ÃÔõôд

£º
select ×î´óµÄ(datadate),tradeid,ÆäËû×Ö¶Î..... from ±í where datadate>='20090801' and datadate <='20090831' group by tradeid

ÄÜ·ñ×ö³ÉÊÓͼ? ²éѯÊÓͼÈÕÆð·¶Î§¶¯Ì¬µÄ±ä»¯,

[Quote=ÒýÓà   2   Â¥   oceanmeng   µÄ»Ø¸´:]
ÄÜ·ñ×ö³ÉÊÓͼ?   ²éѯÊÓͼÈÕÆð·¶Î§¶¯Ì¬µÄ±ä»¯,
[/Quote]
視圖²»Ö§³Ö參ÕÕ£¬¿ÉÓôæ儲過³Ì

ÒýÓÃ
ÄÜ·ñ×ö³ÉÊÓͼ? ²éѯÊÓͼÈÕÆð·¶Î§¶¯Ì¬µÄ±ä»¯,

樓Ö÷µÄÒâ˼ÊÇÈÕÆÚ×ö³É變Á¿ 傳參?
ÄÇ×ö³É´æ儲過³Ì°É

OK,xiexie


Ïà¹ØÎÊ´ð£º

ÃÅÍ⺺ÇóÖú...¹ØÓÚºǫ́+SQL+ASP

....½Óµ½Ò»¸öС³ÌÐò..¹¤×÷Ô­À´´ó¸ÅÊÇÕâÑùµÄ...ǰ̨ÊÇWEB·þÎñÆ÷.¼Ü¹¹¾ÍÊÇASP+SQL..ǰ̨ÓÉASPÏòSQLÌí¼Ó·þÎñÀà±ð(±íµ¥).È»ºóÓÖºǫ́³ÌÐò¶ÁÈ¡±íµ¥..Ҫʵʱ¶ÁÈ¡..È»ºóÏÔʾÔÚ·þÎñÆ÷ÉÏÃæ..´ÓÀíÂÛÉÏÃæÄÜÐÐͨ²»?Èç¹û¿ÉÒÔ..ºǫ́ ......

sql server 2005 µÄÖØа²×°ÎÊÌâ

ÖØа²×°sql server 2005ʱ£¬ÔÚ°²×°µ½ÀàËÆdata base service µÄ·þÎñʱ×ÜÊdzöÏîwindows installer µÄ´íÎó¡£
ÎÒÔÚÍøÉϲéÁ˽â¾öµÄ°ì·¨£¬ÏÈÍ£ÁËÕâ¸ö·þÎñ£¬È»ºóÖØÐÂÏÂÔØ°²×°ÁËInstMsiW.exe£¬È»ºóÓÖÆô¶¯Õâ¸ö·þÎñ£¬µ«ÊDz ......

SQLÓï¾äÎÊÌ⣬¸ßÊÖ°ï棡£¡

½«Ò»¸ö±í21~30ɾ³ý£¬sqlÓï¾äÔõôд
Õâ¸öÌ«ÁýͳÁË£¬ÊÇÅÅÐòºóµÄµÚ21Ìõµ½30Ìõ¼Ç¼ɾ³ý»¹ÊÇijһÁÐÖµÔÚ21µ½30Ö®¼äµÄɾ³ý°¡£¿

21-30ÊÇʲôÒâ˼£¿×ֶεĻ°¾Ídelete from table1 where col1>=21 and col1<=30
Ö¸µ ......

sqlÓï¾ä

1.´´½¨Ò»¸öÊý¾Ý¿âʱ
ÓдíÂð£¿Ëü×ÜÊÇÌáʾdbd.ldfÒѾ­´æÔÚ µ«ÊÇÔõô¸ÄÃû¶¼»¹ÊÇÒ»ÑùÌáʾ´æÔÚ
create database testdb
on primary
(name=db1,filename='e:\java\zy\dba.mdf',size=1,maxsize=5,file ......

ÇósqlÓï¾ä

pln_id memo
  1    ÎÒÊÇ
  1    ÄãºÃ
  2    ÄãÊÇ
  2    ÎÒºÃ

½á¹û

  pln_id memo 
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ