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

ÔõÑùÖƶ¨×Ô¼ºµÄSQL Server 2000´¥·¢Æ÷

´´½¨Ò»¸ö¼òµ¥µÄ´¥·¢Æ÷
´¥·¢Æ÷ÊÇÒ»ÖÖÌØÊâµÄ´æ´¢¹ý³Ì£¬ÀàËÆÓÚʼþº¯Êý£¬SQL Server? ÔÊÐíΪ INSERT¡¢UPDATE¡¢DELETE ´´½¨´¥·¢Æ÷£¬¼´µ±ÔÚ±íÖвåÈë¡¢¸üС¢É¾³ý¼Ç¼ʱ£¬´¥·¢Ò»¸ö»òһϵÁÐ T-SQLÓï¾ä¡£
´¥·¢Æ÷¿ÉÒÔÔÚ²éѯ·ÖÎöÆ÷Àï´´½¨£¬Ò²¿ÉÒÔÔÚ±íÃûÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”À´´´½¨£¬²»¹ý¶¼ÊÇҪд T-SQL Óï¾äµÄ£¬Ö»ÊÇÔÚ²éѯ·ÖÎöÆ÷ÀïÒªÏÈÈ·¶¨µ±Ç°²Ù×÷µÄÊý¾Ý¿â¡£
´´½¨´¥·¢Æ÷Óà CREATE TRIGGER
CREATE TRIGGER ´¥·¢Æ÷Ãû³Æ
ON ±íÃû
FOR INSERT¡¢UPDATE »ò DELETE
AS
T-SQL Óï¾ä
×¢Ò⣺´¥·¢Æ÷Ãû³ÆÊDz»¼ÓÒýºÅµÄ¡£
ÈçÏÂÊÇÁª»ú´ÔÊéÉϵÄÒ»¸öʾÀý£¬µ±ÔÚ titles ±íÉϸü¸Ä¼Ç¼ʱ£¬·¢ËÍÓʼþ֪ͨ MaryM¡£
CREATE TRIGGER reminder
ON titles
FOR INSERT, UPDATE, DELETE
AS
EXEC master..xp_sendmail 'MaryM',
'Don''t forget to print a report for the distributors.'
ÖØÃüÃû´¥·¢Æ÷
Óòéѯ·ÖÎöÆ÷ÖØÃüÃû£º
exec sp_rename Ô­Ãû³Æ, ÐÂÃû³Æ
sp_rename ÊÇ SQL Server? ×Ô´øµÄÒ»¸ö´æ´¢¹ý³Ì£¬ÓÃÓÚ¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐÓû§´´½¨µÄ¶ÔÏóµÄÃû³Æ£¬Èç±íÃû¡¢ÁÐ±í¡¢Ë÷ÒýÃûµÈ¡£
ÓÃÆóÒµ¹ÜÀíÆ÷ÖØÃüÃû£º
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùÒªÖØÃüÃûµÄ´¥·¢Æ÷£¬Ð޸Ĵ¥·¢Æ÷Óï¾äÖеĴ¥·¢Æ÷Ãû³Æ£¬µã»÷“È·¶¨”¡£
ɾ³ý´¥·¢Æ÷
Óòéѯ·ÖÎöÆ÷ɾ³ý£º
ÔÚ²éѯ·ÖÎöÆ÷ÖÐʹÓà drop trigger ´¥·¢Æ÷Ãû³Æ À´É¾³ý´¥·¢Æ÷¡£
Ò²¿ÉÒÔͬʱɾ³ý¶à¸ö´¥·¢Æ÷£ºdrop trigger ´¥·¢Æ÷Ãû³Æ,´¥·¢Æ÷Ãû³Æ...
×¢Ò⣺´¥·¢Æ÷Ãû³ÆÊDz»¼ÓÒýºÅµÄ¡£ÔÚɾ³ý´¥·¢Æ÷֮ǰ¿ÉÒÔÏÈ¿´Ò»Ï´¥·¢Æ÷ÊÇ·ñ´æÔÚ£º
if Exists(select name from sysobjects where name=´¥·¢Æ÷Ãû³Æ and xtype='TR')
ÓÃÆóÒµ¹ÜÀíÆ÷ɾ³ý£º
ÔÚÆóÒµ¹ÜÀíÆ÷ÖУ¬ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùҪɾ³ýµÄ´¥·¢Æ÷£¬È»ºóµã»÷“ɾ³ý”¡£
ÈçºÎ²é¿´Ä³¸ö´¥·¢Æ÷µÄÄÚÈÝ
Óòéѯ·ÖÎöÆ÷²é¿´:
use Êý¾Ý¿âÃû
go
exec sp_helptext '´¥·¢Æ÷Ãû³Æ'
½«»áÒÔ±íµÄÑùʽÏÔʾ´¥·¢Æ÷ÄÚÈÝ¡£
³ýÁË´¥·¢Æ÷Í⣬sp_helptext »¹¿ÉÒÔÏÔʾ ¹æÔò¡¢Ä¬ÈÏÖµ¡¢Î´¼ÓÃܵĴ洢¹ý³Ì¡¢Óû§¶¨Ò庯Êý¡¢ÊÓͼµÄÎı¾¡£
ÓÃÆóÒµ¹ÜÀíÆ÷²é¿´£º
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÔñËùÒª²é¿´µÄ´¥·¢Æ÷¡£
ÈçºÎ²é¿´µ±Ç°Êý¾Ý¿âÖÐÓÐÄÄЩ´¥·¢Æ÷
ÔÚ²éѯ·ÖÎöÆ÷ÖÐÔËÐУº
use Êý¾Ý¿âÃû
go
select * from syso


Ïà¹ØÎĵµ£º

SQL SERVER2000´ò²¹¶¡ÎÊÌâ»ã×Ü

SQL SERVER2000´ò²¹¶¡ÎÊÌâ»ã×Ü ¡¾http://hi.baidu.com/yanhai/blog/item/cf67c2ce07a9f50992457e9d.html¡¿
SQL ServerµÄ²¹¶¡°æ±¾¼ì²é²»ÈçWindows ²¹¶¡°æ±¾¼ì²éÖ±½Ó£¬Ò»¸öϵͳ¹ÜÀíÔ±£¬Èç¹û²»Á˽âSQL Server°æ±¾¶ÔÓ¦µÄ²¹¶¡ºÅ£¬¿ÉÄÜÒ²»áÓöµ½Ò»µãÂé·³£¬Òò´ËÔÚÕâ˵Ã÷һϣ¬Í¨¹ýÕâÑùµÄ°ì·¨Åбð»úÆ÷ÊÇ°²È«µÄ°ì·¨£¬²»»á¶Ôϵͳ²úÉúÈ ......

SQLÓï¾ä£º°Ñͳ¼Æ½á¹û°´ÕÕÌض¨µÄÁÐֵת»»³É¶àÁÐ

ÒªÇ󣺲éѯÿ¸öÀÏʦËù´ø±ÏÒµÉè¼ÆµÄ»ã×ÜÇé¿ö£¬±ÏÒµÉè¼ÆѧÉú·Ö±¾¿Æ¡¢×¨¿Æ£¬ÔºÍâ¡¢ÔºÄÚ£¬ÒªÇóµÃµ½µÄ½á¹ûÐÎʽÈçÏ£º
½ÌʦÃû ÔºÄÚ±¾¿Æ Ô°ÄÚר¿Æ ÔºÍâ±¾¿Æ ÔºÍâר¿Æ ºÏ¼Æ
Ïà¹ØµÄ±íÓУºÑ§Éú±í£¨°üº¬Ñ§Éú²ã´Î£©¡¢½Ìʦ±í£¨½ÌʦÃû£©¡¢Ñ§Éú¿ÎÌâ±í£¨Ñ§Éú½Ìʦ¶ÔÓ¦¹ØϵÒÔ¼°ÔºÄÚÔºÍâÐÅÏ¢£©¡£
SQLÓï¾äÈçÏ£º
select
    ......

SQLÓαê¿ìËÙÉÏÊÖ

ÎÊÌâÃèÊö£ºÓÐÒÔÏÂ2ÕÅ±í£¬
      
                            ±íA
      
     & ......

SQL express °²×°Êֲᣭ°²×°

2¡¢sql express °²×° Èç¹ûÔÚXPÏ£¬Ö±½ÓË«»÷°²×°¾ÍºÃÁË¡£ ÏÈ°²×° [ÔÚvistaÏÂÈç¹ûÖ±½ÓË«»÷¿ÉÄÜ»á³öÏÖ °²×°sql server express ³ö´í29506 ] [Vista°²×°µÄʱºò£¬ÐèҪʹÓá°ÒÔ¹ÜÀíÔ±Éí·ÝÔËÐС±°²×°] SQLServer2005_SSMSEE.msi°²×°½áÊø   studioÒѾ­°²×°ÉÏÈ¥£¬µ«ÊÇÄãÓÐûÓз¢ÏÖ£¬°²×°sqlµÄʱºòûÓз¢ÏÖÓÐÓû§saµÄà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ