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

sql ±¸Íü

**************************************
****     sql  ²éѯ±¸Íü                                    ****
**************************************
Ò»£ºÍâÁ¬½Ó£º
1¡¢×óÍâÁ¬½Ó£¨°Ñjoin×ó±ß±íÀïµÄËùÓÐÊý¾Ý¶¼²é³öÀ´¡£È»ºó°Ñjoin Óұ߱íÖеķûºÏÌõ¼þµÄÊý¾Ý¼ÓÔÚ×ó±ß±íµÄºóÃæ¡£¡£¡£¡££©
SELECT *  from t_empl_info as a  LEFT OUTER JOIN t_dept as b 
ON  a.dept_no=b.dept_id
--ͨ³£Çé¿öÏÂÊÇ£º×ó±ß±íÊǶ෽±í¡£Óұ߱íÊÇÒ»·½±í
--ÈýÕűíµÄ×óÍâÁ¬½Ó
 SELECT *
   from A left join  B
   on A.a=B.a
  left join C on B.b = C.b;


Ïà¹ØÎĵµ£º

SqlÓÅ»¯·½·¨

ÎÒÃÇÒª×öµ½²»µ«»áдSQL,»¹Òª×öµ½Ð´³öÐÔÄÜÓÅÁ¼µÄSQL,ÒÔÏÂΪ±ÊÕßѧϰ¡¢ÕªÂ¼¡¢²¢»ã×ܲ¿·Ö×ÊÁÏÓë´ó¼Ò·ÖÏí£¡
£¨1£©      Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
ORACLE µÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom× ......

ÔÚSQLÖÐʹÓÃconvertº¯Êý½øÐÐÈÕÆÚµÄ²éѯ

Ôø¾­Óöµ½ÕâÑùµÄÇé¿ö,ÔÚÊý¾Ý¿âµÄMeeting±íÖÐÓÐPublishTime (DateTime,8)×Ö¶Î,ÓÃÀ´´æ´¢Ò»¸ö¿ª»áʱ¼ä,ÔÚ´æÈëʱÓÉÓÚÒªÖ¸Ã÷¿ª»á¾ßÌåʱ¼ä,¹Ê¸ñʽΪyyyy-mm-dd hh:mm:ss,¶øÎÒÃDzéѯʱÊÇͨ¹ýyyyy-mm-ddÀ´½øÐеÄ,¼´²éѯijһÌìµÄËùÓлáÒéÐÅÏ¢,ÕâÑùÈç¹ûͨ¹ýselect * from Meeting where PublishTime=@PublishTime (²ÎÊý@PublishTimeΪy ......

sql²éѯ»ã×Ü

-
´¦Àí±íÖØ¸´¼Ç¼(²éѯºÍɾ³ý)
/*
*****************************************************************************************************************************************************
1¡¢Num¡¢NameÏàͬµÄÖØ¸´Öµ¼Ç¼,ûÓдóС¹ØÏµÖ»±£ÁôÒ»Ìõ
2¡¢NameÏàͬ,IDÓдóС¹ØÏµÊ±,±£Áô´ó»òСÆäÖÐÒ»¸ö¼Ç¼
ÕûÀíÈË£ºÖÐ ......

ÔÚVB2008 ËٳɰæÖÐʹÓòÎÊý»¯SQL²éѯÓï¾äÎÞЧ

  ×î½ü¸Õѧ»áÔÚVB2008 ÖÐʹÓòÎÊý»¯SQLÓï¾ä£¬ÓÚÊÇÂíÉÏÓõ½´úÂëÖУ¬È´Åöµ½²é²»µ½ÈκÎÊý¾ÝµÄÇé¿ö£¬¾À½áÁ˺ü¸Ì죬»¹ÊÇûÓиãÃ÷°×£¬²îµãÍÂѪ¡£²»µÃÒÑ»¹ÊÇÏÈÔÚ´úÂëÖÐʹÓÃ×Ö·û´®Æ´½ÓµÄSQLÓï¾ä¡£
  °üº¬²ÎÊý»¯SQLÓï¾äµÄ´úÂëÈçÏ£º
            Dim cmSl As N ......

asp.net½«sqlÊý¾Ýµ¼³öexcel±í¸ñ(´úsql×Ö¶ÎÃû)

protected void Button1_Click(object sender, EventArgs e)
{
string strsql = "select * from TreeViewTemp where parentID=0";
DataTable dt = db.GetDataTable(strsql);
StringWriter sw = new StringWriter();
//StreamWriter sw = new Strea ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ