SQL code:
select a.nm
from a
where a.op_id=(select a.op_id
from a,b
where a.op_id=b.u_id and b.or_id=(select b.or_id
from b,c
where b.or_id=c.re_id and c.re_id='000 ......
±íÃû£ºMyTable
Dept Name
1 a
1 b
2 c
2 d
2 e
3 NULL
ÎÒÏëÒªµÄ½á¹û£º
......
Êý¾ÝÕâÑù
mingcheng shuliang£¨int£©
Æ»¹û 0
ѼÀæ 0
éÙ×Ó 1
Î÷¹Ï -1
ÎÒÐèÒªÅÅÐò°Ñ²»Îª0µÄÅÅÔÚÇ°Ãæ
......
ÎÒµÄsqlÓï¾äÈçÏ£º
select a.productname,a.sell_price,b.id from umc_product a left join umc_product_image b on a.id=b.id where a.id='1034';
°Ñ½á¹û·ÅÔÚ¸ö$arrÀÕâʱ$arr[0]ÓÐÖµ£¬$arr[1]ÓÐÖµ£¬µ«$arr[2]Àïûֵ,ÓÃ$arr['id']Ò²Äò»µ½¡£
µ«ÊÇsqlÓï¾ä¸Äµ½ÈçÏÂ,$arr[2]Àï¾ÍÓÐÖµÁ ......
SqlCommand cmd = new SqlCommand("select * from WARE where warename='" + TextBox1.Text + "'", conn); Õâ¸ö¿ÉÒÔSQL×¢È룬Ã÷°×¡£
//SqlCommand cmd = new SqlCommand("jian", conn);
//cmd.Comma ......
µÚÒ»¸ö±í£º
jc1 jc2 jc3 ysbh
2.2 2.3 2.5 0001
µÚ¶þ¸ö±í£º
jc4 jc5 jc6 ysbh
a b c 0002
ysbhÏà¹ØÁªµÄ±íÊÇ£º
ysbh ysxm
0001 Õ ......