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

½â¾öSQL ServerÀïsp_helptextÊä³ö¸ñʽ´íÐÐÎÊÌâ

use Master 
go 
if object_id('SP_SQL') is not null 
  drop proc SP_SQL 
go 
create proc [dbo].[SP_SQL](@ObjectName sysname) 
as 
set nocount on ; 
declare @Print varchar(max) 
if exists(select 1 from syscomments  where ID=object_id(@ObjectName) and encrypted=1) 
  begin 
       Print N'對ÏóÒѼÓÃÜ!' 
       return 
  end 
if coalesce(object_id(@ObjectName,N'P'),object_id(@ObjectName,N'FN'),object_id(@ObjectName,N'IF'),object_id(@ObjectName,N'TF'),object_id(@ObjectName,N'TR'),object_id(@ObjectName,N'V')) is  null 
  begin 
      Print N'對ÏóÖ»針對º¯數¡¢´æ儲過³Ì¡¢觸發Æ÷¡¢視圖!' 
      return  
  end 
print 'Use '+db_Name() 
print 'Go' 
print 'if object_ID('+quotename(case when charindex(']',@ObjectName)=0 then '['+replace(rtrim(@ObjectName),'.','].[')+']' else @ObjectName end ,'''')+') is not null' 
print char(9)+'Drop '+case  when object_id(@ObjectName,N'P') is not null then 'Procedure ' when Coalesce(object_id(@ObjectName,N'FN'),object_id(@ObjectName,N'IF'),object_id(@ObjectName,N'TF')) is not null then 'Function ' when object_id(@ObjectName,N'TR') is not null then 'Trigger ' else 'View 'end +case when charindex(']',@ObjectName)=0 then '['+replace(rtrim(@ObjectName),'.','].[')+']' else @ObjectName end 
Print 'Go' 
declare @T table(Col nvarchar(max)) 
insert @T select object_definition(object_id(@ObjectName)) +char(13)+char(10) 
while (select max(Col) from @T)>'' 
  begin 
      select top 1 @Print=left(Col,charindex(char(13)+char(10),Col)-1) from @T 
      print @Print 
   


Ïà¹ØÎĵµ£º

oracle sql loader


SQL*LOADERÊÇORACLEµÄÊý¾Ý¼ÓÔع¤¾ß£¬Í¨³£ÓÃÀ´½«²Ù×÷ϵͳÎļþǨÒƵ½ORACLEÊý¾Ý¿âÖС£SQL*LOADERÊÇ´óÐÍÊý¾Ý
²Ö¿âÑ¡ÔñʹÓõļÓÔØ·½·¨¡£
¡¡¡¡ÔÚNTÏ£¬SQL*LOADERµÄÃüÁîΪSQLLDR£¬ÔÚUNIXÏÂÒ»°ãΪsqlldr/sqlload¡£
¡¡¡¡ÈçÖ´ÐУºd:\oracle>sqlldr
SQL*Loader: Release 8.1.6.0.0 - Production on ÐÇÆÚ¶þ 1ÔÂ 8 11:06:42 2 ......

SQLÓï¾äÓÅ»¯¼¼Êõ·ÖÎö

×î½ü¼¸ÖÜÒ»Ö±ÔÚ½øÐÐÊý¾Ý¿âÅàѵ£¬ÀÏʦ¾«Õ¿µÄ¼¼ÊõºÍÉú¶¯µÄ½²½âʹÎÒÊÜÒæ·Ëdz¡£ÎªÁËÈøü¶àµÄÐÂÊÖÊÜÒ棬ÎÒ³é¿Õ°ÑSQLÓï¾äÓÅ»¯²¿·Ö½øÐÐÁËÕûÀí£¬Ï£Íû´ó¼ÒÒ»Æð½ø²½¡£¡¡¡¡
¡¡¡¡Ò»¡¢²Ù×÷·ûÓÅ»¯¡¡¡¡
¡¡1¡¢IN ²Ù×÷·û ¡¡¡¡
¡¡¡¡ÓÃINд³öÀ´µÄSQLµÄÓŵãÊDZȽÏÈÝÒ×д¼°ÇåÎúÒ׶®£¬Õâ±È½ÏÊʺÏÏÖ´úÈí¼þ¿ª·¢µÄ·ç¸ñ¡£µ«ÊÇÓÃINµÄSQLÐÔÄÜ×ÜÊÇ±È½Ï ......

SQLǶÌ××Ó²éѯ


      ʹÓÃ×Ó²éѯµÄÔ­Ôò
      1.Ò»¸ö×Ó²éѯ±ØÐë·ÅÔÚÔ²À¨ºÅÖС£
      2.½«×Ó²éѯ·ÅÔڱȽÏÌõ¼þµÄÓÒ±ßÒÔÔö¼Ó¿É¶ÁÐÔ¡£
      ×Ó²éѯ²»°üº¬ ORDER BY ×Ӿ䡣¶ÔÒ»¸ö SELECT Óï¾äÖ»ÄÜÓÃÒ»¸ö ORDER BY ×Ó¾ä,
&nb ......

SQLÊý¾Ý¿âÖÐÓÃimageÀ´´æ´¢Îļþ

SQLÊý¾Ý¿âÖÐÓÃimageÀ´´æ´¢Îļþ,µ«SQLûÓÐÌṩֱ½ÓµÄ´æÈ¡ÎļþµÄÃüÁî.
/*--bcp ʵÏÖ¶þ½øÖÆÎļþµÄµ¼Èëµ¼³ö
 Ö§³Öimage,text,ntext×ֶεĵ¼Èë/µ¼³ö
 imageÊʺÏÓÚ¶þ½øÖÆÎļþ,°üÀ¨:WordÎĵµ,ExcelÎĵµ,ͼƬ,ÒôÀÖµÈ
 text,ntextÊʺÏÓÚÎı¾Êý¾ÝÎļþ
 ×¢Òâ:µ¼Èëʱ,½«¸²¸ÇÂú×ãÌõ¼þµÄËùÓÐÐÐ
  µ¼³öʱ,½ ......

·¢±íÒ»¿îSQL×Ö·û´®µÄ¼ò·±Ì庯Êý

簡體數據庫轉·±體數據庫µÄ問題 °ÝÍÐÁË
ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE DatabaseName COLLATE Chinese_Taiwan_Stroke_CI_AS
ALTER DATABASE DatabaseName SET MULTI_USER WITH ROLLBACK ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ