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

SQL ServerË÷Òýͳ¼ÆÐÅϢδ¼°Ê±¸üУ¬µ¼ÖÂÅÅÐò»ìÂÒ

½ñÌ죬Óöµ½ÁËÕâÑùµÄÒ»¸öÀý×Ó£º
SQL ServerË÷Òýͳ¼ÆÐÅϢδ¼°Ê±¸üУ¬µ¼ÖÂÅÅÐò»ìÂÒ
ÎÒÃÇÖªµÀ£¬ÔÚsql
serverÉÏ´´½¨Ë÷Òýºó£¬Í¬Ê±»á¶Ô¸ÃË÷ÒýÉϵÄÖµ½øÐÐÅÅÐò£¬µ«¶ÔÓÚÐÂÔö¼ÓµÄÖµ£¬Èç¹ûδÄܼ°Ê±¸üÐÂͳ¼ÆÐÅÏ¢£¬½«ÓпÉÄܵ¼ÖÂÅÅÐòµÄ»ìÂÒ£¬Ò²¾ÍÊÇûÓÐÅÅÐò¡£
ÕâÊDzúÉúÎÊÌâµÄÓï¾ä£º
Select * from V_L_IcStockProInEntry Where FInterID= '329482'
V_L_IcStockProInEntryÊÇÒ»¸öÊÓͼ£¬ÆäÓï¾äÈçÏ£º
SELECT t2.FInterID, t2.FSeq,
t2.FItemID, t2.FMustQty, t2.FQty  
from dbo.IcStockProIn AS t1 INNER JOIN   
dbo.
IcStockProInEntry

AS t2 ON t1.FInterID = t2.FInterID LEFT OUTER JOIN   
dbo.t_IcItem AS t3 ON t2.FItemID = t3.FItemID LEFT OUTER JOIN   
dbo.IcProductTrace AS d ON t2.FTraceInterid = d.FInterID LEFT OUTER
JOIN   
dbo.t_IcItemPrimary AS e ON d.FMainItemID = e.FItemID LEFT OUTER JOIN   

dbo.t_EventType AS t10 ON t2.FQulityID = t10.FID LEFT OUTER JOIN   
dbo.t_Customer AS h ON t2.FCustID = h.FID LEFT OUTER JOIN   
dbo.V_WorkItem AS i ON t2.FStWorkItemID = i.FitemID LEFT OUTER JOIN   
dbo.IcShopMo

AS G ON
G.FinterID = t2.FSourceInterID   
²éѯµÄ½á¹ûÊÇfinterid¶ÔÓ¦µÄ¶à¸öfseqֵδÄÜÕý³£ÅÅÐò¡£
finteridºÍfseq
ÊôÓÚicstockproinentry±íµÄÁУ¬ÔÚÕâÁ½ÁÐÉÏÓиö¾Û¼¯Ë÷Òý£¬ËùÒÔ»á×Ô¶¯µÄÅÅÐò¡£µ«ÓÉÓÚÊý¾Ý¸üнϿ죬вåÈëµÄֵδÄܼ°Ê±ÓÐЧÅÅÐò£¬ËùÒÔµ¼ÖÂ
ÁËÅÅÐòµÄ»ìÂÒ¡£
Ê×ÏÈÀ´¿´ÏÂͳ¼ÆÐÅÏ¢£º
dbcc show_statistics('IcStockProInEntry',PK_IcStockProInEntry)
RANGE_HI_KEY    RANGE_ROWS    EQ_ROWS    DISTINCT_RANGE_ROWS   
AVG_RANGE_ROWS
3    0    1    0    1
...
....
282987    101155    6    27942    3.620178
288803    18440    1    5253    3.510375
296886    24587    6  &nb


Ïà¹ØÎĵµ£º

³£ÓÃSQLÓï¾ä¼¯ºÏ

1¡¢ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb) (Access¿ÉÓÃ)
·¨Ò»£ºselect * into b from a where 1 <>1
·¨¶þ£ºselect top 0 * into b from a
2¡¢ËµÃ÷£º¿½±´±í(¿½±´Êý¾Ý,Ô´±íÃû£ºa Ä¿±ê±íÃû£ºb) (Access¿ÉÓÃ)
insert into b(a, b, c) select d,e,f from b;
3¡¢ËµÃ÷£º¿çÊý¾Ý¿âÖ®¼ä±íµÄ¿½±´(¾ßÌåÊý¾ÝʹÓà ......

oracle sqlÓï¾äÓÅ»¯»ù´¡

¾¡Á¿ÉÙÓÃIN²Ù×÷·û£¬»ù±¾ÉÏËùÓеÄIN²Ù×÷·û¶¼¿ÉÒÔÓÃEXISTS´úÌæ¡£
²»ÓÃNOT IN²Ù×÷·û£¬¿ÉÒÔÓÃNOT EXISTS»òÕßÍâÁ¬½Ó+Ìæ´ú¡£
OracleÔÚÖ´ÐÐIN×Ó²éѯʱ£¬Ê×ÏÈÖ´ÐÐ×Ó²éѯ£¬½«²éѯ½á¹û·ÅÈëÁÙʱ±íÔÙÖ´ÐÐÖ÷²éѯ¡£¶øEXISTÔòÊÇÊ×Ïȼì²éÖ÷²éѯ£¬È»ºóÔËÐÐ×Ó²éѯֱµ½ÕÒµ½µÚÒ»¸öÆ¥ÅäÏî¡£NOT EXISTS±ÈNOT INЧÂÊÉԸߡ£µ«¾ßÌåÔÚÑ¡ÔñIN»òEXIST² ......

SQL Server 2000ÖеĴ¥·¢Æ÷ʹÓÃ

¿ÉÒÔ¶¨ÒåÒ»¸öÎÞÂÛºÎʱÓÃINSERTÓï¾äÏò±íÖвåÈëÊý¾Ýʱ¶¼»áÖ´ÐеĴ¥·¢Æ÷¡£
¡¡¡¡µ±´¥·¢INSERT´¥·¢Æ÷ʱ£¬ÐµÄÊý¾ÝÐоͻᱻ²åÈëµ½´¥·¢Æ÷±íºÍinserted±íÖС£inserted±íÊÇÒ»¸öÂß¼­±í£¬Ëü°üº¬ÁËÒѾ­²åÈëµÄÊý¾ÝÐеÄÒ»¸ö¸±±¾¡£inserted±í°üº¬ÁËINSERTÓï¾äÖÐÒѼǼµÄ²åÈ붯×÷¡£inserted±í»¹ÔÊÐíÒýÓÃÓɳõʼ»¯INSERTÓï¾ä¶ø²úÉúµÄÈÕÖ¾Êý¾Ý ......

sqlÓï¾ä°ÂÃîÖ®Ò»

ÀýÈçÎÊÌ⣺ÏÖÔÚÄãÃæ¶ÔÒ»Õűí table1 , table1ÖÐÓиö×Ö¶ÎΪsales_salary £¬ÔÚÊý¾Ý¿â´æ·ÅµÄ×Ö¶ÎΪint ÀàÐÍ ¡£
ÒªÇó£¬Äãͳ¼ÆµÄ½á¹ûµ¥Î»£¨ÍòÔª£©£¬±£Áô2λСÊý¡£²¢ÇÒ»áÓÐÕâÑùµÄµÈʽ £¨1ÐУ«2ÐУ½3ÐУ½7ÐУ«8ÐУ© Ãæ¶ÔÕâÑùµÄÎÊÌ⣬½â¾öµÄ·½°¸Óкܶࡣ±ÈÈ磬Äã¿ÉÒÔͨ¹ýÊÓͼµÄ·½°¸À´½â¾ö£¬»ò¿ØÖÆÊäÈëÓò ...
µ«ÓÐÒ»ÖÖµÈЧ¿ØÖÆÊäÈë ......

SQL Server 2005°²×°Ê§°ÜµÄ´¦Àí·½·¨

ÔÚ°²×°SQL Server 2005¿ª·¢°æʱ³öÏÖÎÊÌâ¡£°²×°»·¾³Îªwindows xp sp3£¬°²×°Óû§Ê¹Ó󬼶¹ÜÀíÔ±£¨Administrator£©¡£³öÏֵĴíÎóÊÇ
ÔÚ°²×°“Integration Services”²½Öèʱ³öÏÖ°²×°´íÎó£¬Ìáʾ“´íÎó: -2146233087”¡£
´íÎó¼Ç¼
±êÌâ:
Microsoft SQL Server 2005 °²×°³ÌÐò
ÎÞ·¨ÔÚ COM+ Ŀ¼Öа²×°ºÍÅäÖ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ