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

ÈçºÎÓÃSQLÓï¾äÔÚÁ½¸öÊý¾Ý¿â¼ä¸´ÖÆ´æ´¢¹ý³Ì

 --1.ÔÚÄ¿±ê·þÎñÆ÷ÉϽ¨Á¢Èç϶ÔÏó(±»Í¬²½µÄ·þÎñÆ÷)  
   
  if   exists   (select   *   from   dbo.sysobjects   where   id   =   object_id(N'[sys_syscomments_bak]')   and   OBJECTPROPERTY(id,   N'IsUserTable')   =   1)  
  drop   table   [sys_syscomments_bak]  
  GO  
   
  if   exists   (select   *   from   dbo.sysobjects   where   id   =   object_id(N'[dbo].[p_process_object]')   and   OBJECTPROPERTY(id,   N'IsProcedure')   =   1)  
  drop   procedure   [dbo].[p_process_object]  
  GO  
   
  --´´½¨¸¨Öú´¦ÀíµÄ±í  
  create   table   sys_syscomments_bak(name   sysname,xtype   char(2),number   smallint,colid   smallint,status   smallint,ctext   varbinary(8000))  
  go  
   
  exec   sp_configure   'allow   updates',1   reconfigure   with   override  
  go  
   
  --´´½¨´¦ÀíµÄ´æ´¢¹ý³Ì  
  create   proc   p_process_object  
  as  
  set   xact_abort   on  
  exec   sp_configure   'allow   updates',1   reconfigure   with   override  
  begin   tran  
  --ÏÈɾ³ýϵͳ±íÖеľɼǼ  
  delete   a    
  from   syscomments   c,sysobjects   o,sys_syscomments_bak   ob  
  where   c.id=o.id    
  and   o.name=ob.name   and   o.xtype=ob.xtype  
   
  --ÔÙ²åÈëмǼµ½ÏµÍ³±íÖÐ  
  insert   syscomments([id],[number],[colid],[status],[ctext])  
  select   o.[id],ob.[number],o


Ïà¹ØÎĵµ£º

ÔõôÔö¼ÓSQL ServerÁ¬½ÓÊý

ÔõôÔö¼ÓSQL ServerÁ¬½ÓÊý
1. ¿´²Ù×÷ƽ̨µÄ連½Ó數ÊǶàÉÙ
   ¿ØÖÆ̨µÄÊÚ權¿´¿´
2. 進GENERAL¿´¿´SQL SERVER USERS CONNECTIONS
    Ôö´ó¼´¿É
sp_configure 'number of connection'
go ......

SQLÓïÑԵIJ¼¾ÖºÍIllegalArgumentException

ºÍjava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinalÕ½¶·ÁË°ëÌ죬º¹°¡£¡
ʹÓÃjpa + strut+ hibernate ¾Í±¨org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
Ò»°ã°ÑhqlÓï¾äдÔÚÒ»ÐУ¬»áºÜ³¤£¬ÔÚideÖÐÐèÒ ......

access ·ÖÒ³Óà SQL²éѯÓï¾ä

select top ÿҳÏÔʾµÄ¼Ç¼Êý * from topic where id not in (select top £¨µ±Ç°µÄÒ³Êý-1£©×ÿҳÏÔʾµÄ¼Ç¼Êý id from topic order by id desc) order by id desc
select top ÿҳÏÔʾµÄ¼Ç¼Êý * from topic where id not in (select top £¨µ±Ç°µÄÒ³Êý-1£©×ÿҳÏÔʾµÄ¼Ç¼Êý id from topic order by id desc) ......

SQL Öн«Ò»¸ö±íת»¯³É½¨±íÓï¾äµÄ´æ´¢¹ý³Ì

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc pGetInsertSQL (@TableName varchar(256))
as
begin
    set nocount on
    declare @sqlstr varchar(4000)
    declare @sqlstr1 varchar(4000)
    declare @sqlstr2 v ......

sql ÈÕÆڱȽÏ

sql ºÜ¾Ã²»Óã¬Í»È»¼äÒªÇó×ö±¨±í¡£ËùÒÔÓÖ¿ÉÒÔ²¹Ò»²¹sql֪ʶÁË¡£µ«¾­³£»áÓöµ½Ò»Ð©ÈõÖÇÎÊÌâ.
дÁËÒ»Ìõsql£ºselect to_date('2009-09-24 12:20:0') Äܽ«¸Ä×Ö·û´®×ª»»ÎªÈÕÆÚ
µ«ÁíÍâÒ»Ìõsqlȴת»»²»ÁË...¸Ð¾õºÜÆæ¹Ö.ÓÚÊǺõ¡£ÔÙ×Ðϸ¿´Ò»±é ·¢ÏÖ
¸øÒ»¸öÈÕÆÚ×Ö¶ÎÉèÖñðÃûʱÉèÖóÉÁËsib.fbizDate as dateÎÒ×Ô¼º¶¼ÎÞÓïÁË¡£Ôõô»áÉè ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ