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

hibernateɾ³ý²Ù×÷µÄsqlÓï¾äд·¨

 
µÚÒ»ÖÖ£º
public void deleteUser(String byemail) {
  Session session = getSession();
  Transaction transaction = null;
  String hql = "delete from Register where email=?
";
  try {
   transaction = session.beginTransaction();
   System.out.println(hql);
   Query q = session.createQuery(hql);
   System.out.println(q);
   q.setParameter(0,byemail);//ÕâÀïÓÃsetParameter
(int position, Object val)
 System.out.println("q+++++++");
   q.executeUpdate();
   System.out.println("update");
   transaction.commit();
   System.out.println("commit");
  } catch (HibernateException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();
   if (transaction != null) {
    // µ±·¢ÉúÒ쳣ʱ»Ø¹öÊÂÎñ£¬È¡ÏûÊý¾Ý¿â²Ù×÷
    transaction.rollback();
    System.out.println("#######ɾ³ý·¢ÉúÒì³££¬ÊÂÎñ»Ø¹ö#########");
   }
  } finally {
   session.close();
  }
µÚ¶þÖÖ£º
public void deleteUser(String byemail
) {
  Session session = getSession();
  Transaction transaction = null;
  String hql = "delete from Register where email=:byemail
";
  try {
   transaction = session.beginTransaction();
   System.out.println(hql);
   Query q = session.createQuery(hql);
   System.out.println(q);
   q.setParameter("byemail
",byemai
l);
   System.out.println("q+++++++");
   q.executeUpdate();
   System.out.println("update");
   transaction.commi


Ïà¹ØÎĵµ£º

EXCEL µ¼ÈëSQL SERVER´æ´¢¹ý³Ì

 set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER proc [dbo].[pr_xls_to_tb]
@path varchar(200),--EXCEL·¾¶Ãû
@tbName varchar(30),--±íÃû
@stName varchar(30) --excelÖÐÒª¶ÁµÄSHEETÃû
as
declare @sql varchar(500),--×îºóÒªÖ´ÐеÄSQL
@stName_Real varchar(35),--ÕæÕýµÄSHEETÃû
......

SQL×¢Èë¹¥»÷·À·¶¼¼ÇÉ


SQL×¢Èë¹¥»÷·À·¶¼¼ÇÉ
Ò»°ãµÄSQL×¢Èë¹¥»÷¶¼ÊÇͨ¹ý¹¹½¨Ò»Ìõ¸´ÔÓµÄsqlÓï¾ä£¬
ͨ¹ýÍøҳ©¶´À´Ö´ÐÐsqlÓï¾ä£¬´ïµ½¹¥»÷Êý¾Ý¿âµÄÄ¿µÄ¡£
Èçͨ¹ýÎÄÕÂIDÀ´²éѯijһƪÎÄÕµÄÍøÒ³£¬
ͨ³£²ÉÓõÄsqlÓï¾äΪ£º
sql="select top 1 * from articles where articId="&request("id")
ÄÇô¿ÉÒÔ¼òµ ......

sql server2005·µ»ØÖµÎÊÌâ

(1)¹ØÓÚ´æ´¢¹ý³Ì·µ»ØÖµÎÊÌ⣨output,ruturn£©
  output´æ´¢¹ý³Ì£º
  
alter proc usp_update
@count int output
as
set @count=(select count(*) from stu)
   
 return´æ´¢¹ý³Ì£º
alter proc usp_update
as
declare @count int
set @count=(select count(*) from stu)
r ......

PL/SQL DeveloperʹÓü¼ÇÉ

 1¡¢PL/SQL
Developer¼ÇסµÇ½ÃÜÂë
   ÔÚʹÓÃPL/SQL
Developerʱ£¬ÎªÁ˹¤×÷·½±ãÏ£ÍûPL/SQL
Developer¼ÇסµÇ¼OracleµÄÓû§ÃûºÍÃÜÂ룻
ÉèÖ÷½·¨£ºPL/SQL
Developer 7.1.2 
->tools->Preferences->Oracle->Logon History £¬ “Store
history”ÊÇĬÈϹ´Ñ¡µÄ£¬¹´ÉÏ&ldqu ......

Oracle PL/SQLÈëÃÅÖ®¿®Êö

 Ò»¡¢PL/SQL³öÏÖµÄÄ¿µÄ
¡¡¡¡½á¹¹»¯²éѯÓïÑÔ(Structured Query
Language£¬¼ò³ÆSQL)ÊÇÓÃÀ´·ÃÎʹØϵÐÍÊý¾Ý¿âÒ»ÖÖͨÓÃÓïÑÔ£¬ËüÊôÓÚµÚËÄ´úÓïÑÔ£¨4GL£©£¬ÆäÖ´ÐÐÌصãÊǷǹý³Ì»¯£¬¼´²»ÓÃÖ¸Ã÷Ö´ÐеľßÌå·½·¨ºÍ;
¾¶£¬¶øÊǼòµ¥µÄµ÷ÓÃÏàÓ¦Óï¾äÀ´Ö±½ÓÈ¡µÃ½á¹û¼´¿É¡£ÏÔÈ»£¬ÕâÖÖ²»¹Ø×¢ÈκÎʵÏÖϸ½ÚµÄÓïÑÔ¶ÔÓÚ¿ª·¢ÕßÀ´ËµÓÐ׿«´óµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ