sql:´æ´¢¹ý³Ì£¬ÊÂÎñ£¬out²ÎÊý
CREATE proc [dbo].[proc_DeleteTemplet] (@templeId varchar(15),@errorMessage varchar(50) output)
as
begin
declare @error int
set @error =0
begin tran
delete from tc_templet_Head where fBillNo=@templeId
set @error=@error+@@error
delete from tc_templet_Detail where fBillNo=@templeId
set @error=@error+@@error
if @error<>0
begin
set @errorMessage='ɾ³ý¶©µ¥Ä£°åʧ°Ü'
rollback tran
end
else
begin
set @errorMessage=''
commit tran
end
en
--------------------------------------------------------------------------------------------------------------------------------------------------
SQL Server ϵͳȫ¾Ö±äÁ¿
@@CONNECTIONS
·µ»Ø×ÔÉÏ´ÎÆô¶¯ÒÔÀ´Á¬½Ó»òÊÔͼÁ¬½ÓµÄ´ÎÊý¡£
@@CURSOR_ROWS
·µ»ØÁ¬½ÓÉÏ×îºó´ò¿ªµÄÓαêÖе±Ç°´æÔڵĺϸñÐеÄÊýÁ¿(·µ»Ø±»´ò¿ªµÄÓαêÖл¹Î´±»¶ÁÈ¡µÄÓÐЧÊý¾ÝÐеÄÐÐÊý)
@@DATEFIRST
·µ»ØÿÖܵÚÒ»ÌìµÄÊý×Ö
@@ERROR
·µ»Ø×îºóÖ´ÐеÄSQL Óï¾äµÄ´íÎó´úÂë¡£
@@FETCH_STATUS
·µ»Ø±» FETCH Óï¾äÖ´ÐеÄ×îºóÓαêµÄ״̬£¬¶ø²»ÊÇÈκε±Ç°±»Á¬½Ó´ò¿ªµÄÓαêµÄ״̬¡£
@@IDENTITY
·µ»Ø×îºó²åÈëµÄ±êʶֵ
@@LANGID
·µ»Øµ±Ç°ËùʹÓÃÓïÑԵı¾µØÓïÑÔ±êʶ·û(ID)¡£
@@LANGUAGE
·µ»Øµ±Ç°Ê¹ÓõÄÓïÑÔÃû¡£
@@LOCK_TIMEOUT
·µ»Øµ±Ç°»á»°µÄµ±Ç°Ëø³¬Ê±ÉèÖ㬵¥Î»ÎªºÁÃë¡£
@@PROCID
·µ»Øµ±Ç°¹ý³ÌµÄ´æ´¢¹ý³Ì±êʶ·û (ID) ¡£
@@ROWCOUNT
·µ»ØÊÜÉÏÒ»Óï¾äÓ°ÏìµÄÐÐÊý¡£
@@SERVERNAME
·µ»ØÔËÐÐ µÄ±¾µØ·þÎñÆ÷Ãû³Æ¡£
@@SPID
·µ»Øµ±Ç°Óû§½ø³ÌµÄ·þÎñÆ÷½ø³Ì±êʶ·û (ID)¡£
@@TRANCOUNT
·µ»Øµ±Ç°Á¬½ÓµÄ»î¶¯ÊÂÎñÊý¡£
@@VERSION
·µ»Øµ±Ç°°²×°µÄÈÕÆÚ¡¢°æ±¾ºÍ´¦ÀíÆ÷ÀàÐÍ¡£
@@CPU_BUSY
·µ»Ø×ÔSQL Server ×î½üÒ»´ÎÆô¶¯ÒÔÀ´CPU µÄ¹¤×÷ʱ¼äÆ䵥λΪºÁÃë
@@DATEFIRST
·µ»ØʹÓÃSET DATEFIRST ÃüÁî¶ø±»¸³ÖµµÄDATAFIRST ²ÎÊýÖµSET DATEFIRST£¬ÃüÁîÓÃÀ´Ö¸¶¨Ã¿ÖܵĵÚÒ»ÌìÊÇÐÇÆÚ¼¸
@@DBTS
·µ»Øµ±Ç°Êý¾Ý¿âµÄʱ¼ä´ÁÖµ±ØÐë±£Ö¤Êý¾Ý¿âÖÐʱ¼ä´ÁµÄÖµÊÇΩһµÄ
@@ERROR
·µ»
Ïà¹ØÎĵµ£º
ÐÔÄܼà¿ØÖ®¼à¿ØSQLÓï¾ä
·ÖÎö±í
analyze table tablename compute statistics for all indexes;
analyze table tablename compute statistics for all indexed columns;
analyze table tablename compute statistics for table;
¼à¿ØÊÂÀýµÄµÈ´ý
select event,sum(decode(wait_Tim ......
SQLÓï¾äÖеÄHaving×Ó¾äÓëwhere×Ó¾äÖ®Çø±ð
---WHERE¾ä×Ó×÷ÓÃÓÚ»ù±¾±í»òÊÔͼ£¬´ÓÖÐÑ¡ÔñÂú×ãÌõ¼þµÄÔª×é¡£HAVING×÷ÓÃÓÚ×飬´ÓÖÐÑ¡ÔñÂú×ãÌõ¼þµÄ×é---
ÔÚ˵Çø±ð֮ǰ£¬µÃÏȽéÉÜGROUP BYÕâ¸ö×Ӿ䣬¶øÔÚ˵GROUP×Ó¾äÇ°£¬ÓÖµÃÏÈ˵˵“¾ÛºÏº¯Êý”——SQLÓïÑÔÖÐÒ»ÖÖÌØÊâµÄº¯Êý¡£ÀýÈçSUM, COUNT, MAX, AVGµÈ¡£Õâ ......
²éѯÓÅ»¯µÄÄ¿µÄÊÇÌá¸ßÊý¾Ý¼ìË÷Ëٶȣ¬Ìá¸ßÊý¾Ý¼ìË÷Òâζ׿õÉÙ´ÅÅÌ
IO
¶ÁÈ¡»òÕßÂß¼ÄÚ´æ¶ÁÈ¡´ÎÊý£¬ÕâÐèÒª´ÓÁ½¸ö·½ÃæÈëÊÖ£ºÊý¾ÝÒª¾¡¿ÉÄܵĻº´æµ½ÄÚ´æ¡¢¾¡¿ÉÄܵÄʹÓÃË÷Òý¡£ÄÚ´æµÄÎÊÌâ¿ÉÒԲμû
:
http://msdn.microsoft.com/zh-cn/library/ms188284.aspx
£¬±¾ÎÄÖ÷ÒªÊÇÌåÏÖÈçºÎʹÓÃË÷ÒýÀ´Ìá¸ßËٶȡ£¾ßÌå·½·¨£º
1) ......
1.SQL Server Mobile ¼ò½é
2.»ñÈ¡ SQL Server Mobile
3.°²×°±Ø±¸Èí¼þ
4.°²×°¿ª·¢»·¾³
5.°²×°·þÎñÆ÷»·¾³
6.ÅäÖà Web ͬ²½Ïòµ¼
7.ʹÓà Internet Explorer ¼ì²é SQL Server Mobile ·þÎñÆ÷´úÀíÅäÖÃ
8.ʹÓÃSQL Server Mobile Êý¾Ý¿â
==========================
1.SQL Server Mobile ¼ò½é
-------------------------- ......
Èç¹ûÄúÔÚ°²×°SQL Server 2005ʱ³öÏÖ¼ÆÊýÆ÷´íÎó
µã»÷¿ªÊ¼£ÔËÐÐÊäÈë"cmd"£¬È·¶¨ºó½øÈëÃüÁî´°¿Ú£¬ÒÀ´ÎÊäÈëÏÂÃæ4ÌõÃüÁîɾ³ý4¸ö¼ÆÊýÆ÷£º
unlodctr w3svc
unlodctr msftpsvc
unlodctr asp
unlodctr inetinfo
È»ºóÔÙÒÀ´ÎÊäÈëÏÂÃæ4ÌõÃüÁîÖØ×°4¸ö¼ÆÊýÆ÷£º
lodctr w3ctrs.ini
lodctr ftpctrs.ini
lodctr axperf.ini
lod ......