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

¼òµ¥SQLÓï·¨

SELECT A.barcode, A.number, B.goodsname
from pandian AS A INNER JOIN
      baseinfo AS B ON A.barcode = B.barcode


ÏÖÔÚ£º
4961557110306 1 Elsan  Bath chanmÔ¡ÑÎ(É­ÁÖ)
4961557110306 10 Elsan  Bath chanmÔ¡ÑÎ(É­ÁÖ)
4961557011221 20 Elsan Bat hchanmÔ¡ÑÎ(ÄûÃÊ)

ÒªÇó£º


4961557110306 11 Elsan  Bath chanmÔ¡ÑÎ(É­ÁÖ)
4961557011221 20 Elsan Bat hchanmÔ¡ÑÎ(ÄûÃÊ)


Ôõôд¡¢£¿

SELECT A.barcode, max(A.number) number, B.goodsname
from pandian AS A INNER JOIN
baseinfo AS B ON A.barcode = B.barcode
group by A.barcode, B.goodsname



SQL code:
SELECT A.barcode, sum(A.number) as [number] , B.goodsname
from pandian AS A INNER JOIN
baseinfo AS B ON A.barcode = B.barcode
group by A.barcode,B.goodsname


ÒýÓÃ
SELECT A.barcode, max(A.number) number, B.goodsname
from pandian AS A INNER JOIN
baseinfo AS B ON A.barcode = B.barcode
group by A.barcode, B.goodsname




ÊÇsum ºÇºÇ

SQL code:

declare @pandian table (barcode bigint,number int)


Ïà¹ØÎÊ´ð£º

ÈçºÎÓÃc#£¬sql2000 ¿ª·¢c/sÏµĹ¤×÷Á÷£¿

±¾ÈËc#ÐÂÊÖ ¿ÉÊÇÒªÇóÒªÓÃc# £¬sql2000¿ª·¢c/sµÄ¹¤×÷Á÷£¬Ò»Í·ÎíË®£¬Çë´ó¼Ò°ïæ°ï棬¸øµã˼·£¬ËµµÄÔ¼¾ßÌåÔ½ºÃ£¬ÎÒÒ²ºÃÍùÄǸö·½Ãæȥѧϰ
http://www.hxzi.com/view/61402.html
B/S°æµÄ£¬»ù±¾Ë¼ÏëÓ¦¸Ã²î²»¶àµÄ¡£¡£ ......

sql ʱ¼äÎÊÌâ

sql table±íÓиöÎı¾ÀàÐ͵Äa×ֶΣ¬´æ´¢µÄÄÚÈÝÈ«²¿ÊÇÊý×Ö£¬ÀýÈç2009001£¬2008578ÕâÑùµÄ¸ñʽ£»b×Ö¶ÎÎı¾ÀàÐÍ£¬´æµÄÒ²ÊÇÊý×ÖÀýÈç 001£¬123
aspÀïÃæ strday=100£¬strb=001

ÎÒÏë¶Á³ö£¬´Óa×ֶεÄÊý×Ö°´´óµ½Ð¡µÄË ......

pl/sqlµ¼ÈëÊý¾ÝÎÊÌâ

ÎÒEXCELÖÐÒ»¸öµ¥Ôª¸ñµÄÊý¾ÝÈç  "2009-01","8949-232"

½«Õâ¸öÊý¾ÝÕ³Ìùµ½PL/SQLÖеÄÒ»¸ö±íÖкó,Êý¾ÝÈ·ÊdzÉΪÁË 2009-01,8949-232 ,°ÑËùÓеÄ""¶¼Ã»ÁË,
ÈçºÎŪÄØ?Çë´ó¼ÒÊÔ ......

sqlÎļþ£¨Êý¾Ýº¬ÖÐÎÄ£©DOSÃüÁî´°¿ÚÎÞ·¨µ¼ÈëÎÊÌâ

ÎÒÓõÄÊÇmysql5.1£¬Êý¾Ý¿â×Ö·û¼¯Îªutf8

ͨ¹ýdosÃüÁîÐе¼ÈëSQLÎļþ ³ö´í£¬ÎÞ·¨µ¼Èë¡£

½«SQLÎļþÖеÄÊý¾ÝÈ«²¿Ê¹ÓÃÓ¢ÎÄ ¿ÉÒÔµ¼Èë

ÇëÎÊÎÊÌâÔÚÄÄ£¿
×°¸öÖÐÎÄÈí¼þ¼´¿É.

ºÜ¶àÄêÒÔÇ°,Óùý¸öÒ»¸ ......

ÇósqlÓï¾ä

pln_id netnode_id
1          2
2          3
1          3
2          4

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