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

ÀûÓÃhibernateµÄQueryÖ±½ÓÖ´ÐÐSQLÓï¾ä

ÀûÓÃhibernateµÄQuery½øÐÐÖ±½ÓÖ´ÐÐSQLÓï¾ä
Ò»¡¢
String sql = "insert into SHOP_MALL_ACCOUNT_MAP_T (MALL_NO,ACCOUNT) values ('"
+ mallNo + "','" + userId + "')";
SQLQuery query = getSession().createSQLQuery(sql);
query.executeUpdate();
¶þ¡¢
String sql = "select to_char(SYN_DATE,'yyyy-MM-dd HH:mm:ss') from SHOP_TRADES_SYN_TIME_T order by SYN_DATE desc";
SQLQuery query = getSession().createSQLQuery(sql);
query.setMaxResults(1);
String resultDate = (String) query.uniqueResult();


Ïà¹ØÎĵµ£º

SQLÓï¾äÐÔÄܵ÷ÕûÔ­Ôò

 Ò»¡¢ÎÊÌâµÄÌá³ö
    ÔÚÓ¦ÓÃϵͳ¿ª·¢³õÆÚ£¬ÓÉÓÚ¿ª·¢Êý¾Ý¿âÊý¾Ý±È½ÏÉÙ£¬¶ÔÓÚ²éѯSQLÓï¾ä£¬¸´ÔÓÊÓͼµÄµÄ±àдµÈÌå»á²»³öSQLÓï¾ä¸÷ÖÖд·¨µÄÐÔÄÜÓÅÁÓ£¬µ«ÊÇÈç¹û½«Ó¦ÓÃϵͳÌύʵ¼ÊÓ¦Óúó£¬Ëæ×ÅÊý¾Ý¿âÖÐÊý¾ÝµÄÔö¼Ó£¬ÏµÍ³µÄÏìÓ¦ËٶȾͳÉΪĿǰϵͳÐèÒª½â¾öµÄ×îÖ÷ÒªµÄÎÊÌâÖ®Ò»¡£ÏµÍ³ÓÅ»¯ÖÐÒ»¸öºÜÖØÒªµÄ·½ ......

sql ×óÁ¬½Ó ½âÊÍ

Á¬½Ó²éѯ£¬¾ÍÊǽ«
Á½¸ö»ò¶à¸ö
±í»òÊÓͼ
ͨ¹ýÒ»¶¨µÄÌõ¼þ
½«È«²¿»ò²¿·Ý×Ö¶Î
È«²¿»ò²¿·Ý¼Ç¼
Á¬½Óµ½Ò»Æ𣬵õ½Ò»¸öеÄÊý¾Ý¼¯ºÏ¡£
È磺ÓÐÈËÔ±µµ°¸ºÍ¹¤×ʵµ°¸Á½¸ö±í£¬Á½¸ö±íÓй²Í¬µÄ¹Ø¼ü×Ö¶ÎXMDM(ÐÕÃû´úÂ룩£¬ÆäÖÐÈËÔ±µµ°¸´æ´¢ÁËÈËÊÂ×ÊÁÏ£¬¹¤×ʵµ°¸´æ´¢ÁËн³ê×ÊÁÏ¡£
Òò´Ë¿ÉÒÔͨ¹ýXMDM×ֶν«Á½¸ö±íÁ¬½ÓÆðÀ´£¬´Ó¶øʹ²éѯ½ ......

SQL Server 2005´æ´¢¹ý³Ì¿ª·¢µÄÒ»µã¾­Ñé

1¡¢  ´æ´¢¹ý³Ì
1£©  ¾¡Á¿½«´úÂë¶Î·Åµ½TRY…CATCH…¡£
µ«·²Ê¹ÓÃC#д¹ý´úÂëµÄÈË£¬¶¼ÖªµÀC#ÖÐTRY…CATCH…µÄÔËÐкͳö´íÌøתÂß¼­£¬¶øSQL Server2005ÖУ¬ÆäÔËÐкͳö´íÌøתÂß¼­ÓëÔÚC#ÖÐÊÇÒ»Öµġ£TRY…CATCH…ÊÇSQL Server2005ÖÐÐÂÔöµÄ£¬¹¦ÄÜÇ¿´ó£¬ÇҺܺÃÓá£
2£©&nb ......

sqlС±Ê¼Ç£¨5.26£©

sql server 2005 ¼òµ¥ÔËÓú¯Êý
1.null º¯Êý
  Ó÷¨ÓëoracleÖÐnvl()ÀàËÆ£¬´¦Àíº¯ÊýΪisnull()£¬
  ÀýÈ磺
    select ename,sal+isnull(comm,0)
    from emp
    go
  isnull(comm,0)µÄÓ÷¨ÊÇ£º commΪnull Ôò·µ»Ø0 ·ñÔòΪ commµÄÖµ¡£
2.V ......

sql»Ö¸´xp_regread

sql»Ö¸´xp_regread
ɾ³ýµôxp_regreadºó£¬·¢ÏÖÒÔÇ°µÄ×÷Òµ²»Äܲ鿴£¬Ö»ÄÜÈ¥»Ö¸´ÁË¡£
exec sp_addextendedproc 'Xp_dirtree','xpstar.dll'    »Ö¸´ºó·¢ÏÖ²»ÄÜʹÓÃ
ÕÒµ½dbcc addextendedproc ("Xp_regread","xpstar.dll") »¹ÊDz»ÄÜʹÓÃ
ºóÀ´²Å·¢ÏÖ»Ö¸´µÄʱºòÒªÓÃСдdbcc addextended ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ