²éѯmssql´óÅúÁ¿Êý¾Ý
Êý¾Ý¿âÄÚÓÐ500WÌõÊý¾Ý£¬²éѯµÄʱºòÈçºÎÓÅ»¯
Õâ¶Îʱ¼äÒ²ÔÚ¿´SQL.ÎÒ¾õµÃÕâÁ½±¾Êé²»´í!SQLÒÕÊõ,SQL2008¼¼ÊõÄÚÄ» T-SQL»ù´¡.
ȷʵдһÌõ¸ßЧµÄSQL²»ÊÇÈÝÒ×µÄÊÂ!ÎҼǵÃ×îÇå³þµÄÒ»ÌõÊÇ:×î½ü¹ýÂ˵ô²»·ûºÏÌõ¼þµÄ¼Ç¼
500W.......Õâ¸ö½á¹ûË¿´µÄÍê.
sqlÓï¾ä¸´Ôӵϰ,½¨ÒéÓô洢¹ý³Ì. ÓÅ»¯Ã÷È·¾«È·µÄÊý¾Ý½á¹û½øÐвéѯ.
select distinct jixing,guige,danwei,zhuanhuanbi,shengchanqiye,tongyongming from bi_zhongbiaobiaozhunhua as m2 where exists (select id from bi_tongyong as m1 where m1.id=m2.tongyongming and exists (select tongyongname from bi_tongyong where tongyongname=m1.tongyongname and exists(select id from bi_shengchanqiye where id=bi_tongyong.shengchanqiye and shengchanqiye like'%ÉñÍþÒ©Òµ%')) and shengchanqiye not in (select id from bi_shengchanqiye where shengchanqiye like '%ÉñÍþÒ©Òµ%')) order by tongyongming desc
ÕâÑùµÄÒ»ÌõÓï¾ä£¬ÎÒÒѾÔÚ±íÖн¨ÁËË÷Òý
ÕâÑùµÄÓï¾äÈçºÎÓÅ»¯?
Ïà¹ØÎÊ´ð£º
ÏÖÔÚÁ¬µÄÒ»Ô¶³Ìmssql£¬Ã¿´Î²éѯ±È½ÏÂý£¬ÏÖÔÚÏëһϰÑËùÓмǼ²éѯ³öÀ´ÓÃÊý¾Ý¼¯±£´æÆðÀ´£¬È»ºóÕë¶ÔÊý¾Ý¼¯Ôٴβéѯɸѡ¡£
ÏÖÔÚÎÊÏÂÄǸöÊý¾Ý¼¯ÈçºÎ±£´æ²éѯ¼Ç¼£¬¶øÔٴβéѯ£¬¶àлÁË¡£
¿ÉÒÔ°ÑÊý¾Ý¼¯ÖеÄÊý¾Ý·Åµ½ÄÚ´ ......
ÏÖÓÐÒ»¸öASP+mssqlµÄÍøÕ¾£¬±»¹ÒÂíÁË£¬½«ÀïÃæÒ»¸ö±íÖеÄntext×ֶιÒÂí¹ÒÂí£¬¡°<script src=http://ľÂíµØÖ·></script>¡±,µÄ·½Ê½ÊÇ£¬²»¶ÏµØÐ޸ĸÃ×ֶεÄÖµ£¬Ö±½Ó¼ÓÔÚ×îºóµÄ£¬Ê±¼ä³¤ÁË£¬¿ÉÒÔ¿´µ½¸Ã×Ö¶ÎÖÐÓÐ ......
±íµÄ½á¹¹ÈçÏ£º
±í1£ºtb_big
×ֶΣºfalseid Öµ£º1£¬2£¬
×ֶΣºbigtype Öµ£ºA£¬B£¨ÓëfalseidµÄÖµµÄλÖÃÒ»Ò»¶ÔÓ¦£¬¼´1¶ÔÓ¦A£¬2¶ÔÓ¦B£©
±í2£ºtb_small
×ֶΣºfalseid£¨Óëtb_bigµÄfalseid_1¹ØÁªµ ......
±íµÄ½á¹¹ÈçÏ£º
±í1£ºtb_big
×ֶΣºfalseIDÖµ£º1£¬2
×ֶΣºbigtype Öµ£ºA£¬B£¨ÓëfalseIDµÄÖµµÄλÖÃÒ»Ò»¶ÔÓ¦£¬¼´1¶ÔÓ¦A£¬2¶ÔÓ¦B£©
±í2£ºtb_small
×ֶΣºfalseID£¨Óëtb_bigµÄfalseID¹ØÁªµÄ ......