Çë½ÌSQLÓï¾ä
A±í£¨Ö÷±í£©
A1£¨Ö÷¼ü£© A2
1 ÕÅÈý
B±í
B1£¨Íâ¼ü£© B2
1 ZHONG
1 GUO
C±í
C1£¨Íâ¼ü£© C2
1 TIAN
1 KONG
D±í
D1£¨Íâ¼ü£© D2
1 DA
1 RUN
ÈçºÎ°ÑÕâËĸö±í¹ØÁªÆðÀ´£¬½á¹ûÈçÏÂ
A1 A2 B2 C2 D3
1 ÕÅÈý ZHONG TIAN DA
1 ÕÅÈý GUO KONG RUN
ÇëÎÊ´ó¼Ò£¬ÒªµÃµ½ÕâÑùµÄ½á¹û£¬SQLÓï¾ä¸ÃÔõôд¡£
join Ò»¸ö¸ö±íÁ¬
select a.* , b.b2 , c.c2 , d.d2
from a,b,c,d
where a.a1 = b.b1 and a.a1 = c.c1 and a.a1 = d.d1
SQL code
Code highlighting prod
Ïà¹ØÎÊ´ð£º
±¾ÈËc#ÐÂÊÖ ¿ÉÊÇÒªÇóÒªÓÃc# £¬sql2000¿ª·¢c/sµÄ¹¤×÷Á÷£¬Ò»Í·ÎíË®£¬Çë´ó¼Ò°ïæ°ï棬¸øµã˼·£¬ËµµÄÔ¼¾ßÌåÔ½ºÃ£¬ÎÒÒ²ºÃÍùÄǸö·½ÃæÈ¥Ñ§Ï°
http://www.hxzi.com/view/61402.html
B/S°æµÄ£¬»ù±¾Ë¼ÏëÓ¦¸Ã²î²»¶àµÄ¡£¡£ ......
DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)
string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......
»·¾³£º1.win2003server+oracle9i
2.oracle9i×Ö·û¼¯ÎªAMERICAN_AMERICA.WE8ISO8859P1
3.oracle sql developer°æ±¾ 1.5.5
ÏÖÏóÃèÊö: 1.ÔÚsql developer ÖвéѯoracleÖеÄij¸ö±í£¬ÖÐÎÄÈ«²¿ÏÔʾΪÂÒÂë¡£
......
£¨1£©string ConnString = "server=localhost;integrated security=sspi;database=pubs;";
£¨2£©string strConnection="user uid=sa;pwd=123456;Database=test;Server=test;Connect ......
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......