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

¼òµ¥µÄsqlÊý¾Ý¿â´¥·¢Æ÷ʵÀý

--ͨ¹ýsqlÆóÒµ¹ÜÀíÆ÷Ð޸ĺÍɾ³ýa±íÖÐÊý¾Ýʱ»á³öÏÖ´íÎó
--sqlÆóÒµ¹ÜÀíBug£¬Í¨¹ý³ÌÐò»òÖ´ÐÐsqlÓï¾ä¸üÐÂa±íÊý¾ÝûÓÐÎÊÌâ
--Ìí¼Ó
Insert a (FName, FCode, FOther) Values('11','2222','33')
--ÐÞ¸Ä
Update a Set FName='22_Edit' Where FCode='22'
--ɾ³ý
Delete a Where FCode='22'
--²é¿´a/b±íÊý¾Ý
Select * from a
Select * from b
/*
--Insert
Create trigger a_insert
on a
--with encryption
after insert
as
Declare @FCode Varchar(100)
Declare @FName Varchar(100)
Declare @FID int
--inserted£º»ñÈ¡Ìí¼ÓµÄ¼Ç¼µÄÏà¹ØÐÅÏ¢
select Top 1 @FCode=a.FCode,@FName=a.FName,@FID=a.fid from a,inserted Where inserted.FID=a.FID
Insert Into b (FCode,FName,A_FID) Values(@FCode,@FName,@FID)
--Update
Alter trigger a_update
on a
--with encryption
after Update
as
Declare @FCode Varchar(100)
Declare @FName Varchar(100)
Declare @FID Varchar(100)
--deleted£º »ñÈ¡ÐÞ¸Äǰ¼Ç¼µÄÏà¹ØÐÅÏ¢
--inserted£º»ñÈ¡Ð޸ĺó¼Ç¼µÄÏà¹ØÐÅÏ¢
Update b Set FCode=i.FCode,FName=i.FName
from b ,Deleted d ,Inserted i
Where b.A_FID=d.FID
--delete
Alter trigger a_delete
on a
--with encryption
after delete
as
--deleted£º »ñÈ¡ÐÞ¸Äǰ¼Ç¼µÄÏà¹ØÐÅÏ¢
Delete b
from b , Deleted  d
Where b.A_FID=d.FID
*/


Ïà¹ØÎĵµ£º

SQL´¥·¢Æ÷ʵÀý

SQL´¥·¢Æ÷ʵÀý1
¶¨Ò壺 ºÎΪ´¥·¢Æ÷£¿ÔÚSQL ServerÀïÃæÒ²¾ÍÊǶÔijһ¸ö±íµÄÒ»¶¨µÄ²Ù×÷£¬´¥·¢Ä³ÖÖÌõ¼þ£¬´Ó¶øÖ´ÐеÄÒ»¶Î³ÌÐò¡£´¥·¢Æ÷ÊÇÒ»¸öÌØÊâµÄ´æ´¢¹ý³Ì¡£
      ³£¼ûµÄ´¥·¢Æ÷ÓÐÈýÖÖ£º·Ö±ðÓ¦ÓÃÓÚInsert , Update , Delete ʼþ¡£
      ÎÒΪʲôҪʹÓô¥·¢Æ÷£¿±ÈÈ磬 ......

SQL Server 2008 ¶¨Ê±×÷Òµ

--SQL Server 2008 ¶¨Ê±×÷ÒµµÄÖÆ¶¨
--1.´ò¿ª¡¾SQL Server Management Studio¡¿£¬ÔÚ¡¾¶ÔÏó×ÊÔ´¹ÜÀíÆ÷¡¿ÁбíÖÐÑ¡Ôñ¡¾SQL Server ´úÀí¡¿£»
--2.Êó±êÓÒ»÷¡¾SQL Server ´úÀí¡¿£¬Ñ¡Ôñ¡¾Æô¶¯(S)¡¿£¬ÈçÒÑÆô¶¯£¬¿ÉÒÔÊ¡ÂԴ˲½Ö裻
--3.Õ¹¿ª¡¾SQL Server ´úÀí¡¿ÁÐ±í£¬ÓÒ»÷¡¾×÷Òµ¡¿-->¡¾Ð½¨×÷Òµ¡¿£»
--3.1  ÔÚ¡¾³£¹æ¡¿Ñ¡Ïî ......

ÈçºÎÅäÖà SQL Server 2005 ÒÔÔÊÐíÔ¶³ÌÁ¬½Ó

½ñÌìÔÚÒ»¸öVPSÉϰ²×°sql2005£¬°²×°ºÃºó±¾µØÒ»Ö±Á¬½Ó²»ÉÏ
¼ò½é
ÔÚ³¢ÊÔ´ÓÔ¶³Ì¼ÆËã»úÁ¬½Óµ½ Microsoft SQL Server 2005 ʵÀýʱ£¬¿ÉÄÜ»á½ÓÊÕµ½´íÎóÏûÏ¢¡£ÔÚʹÓÃÈκγÌÐòÁ¬½Óµ½ SQL Server ʱ¶¼¿ÉÄܻᷢÉú´ËÎÊÌâ¡£ÀýÈ磬ÔÚʹÓà SQLCMD ʵÓù¤¾ßÁ¬½Óµ½ SQL Server ʱÊÕµ½ÒÔÏ´íÎóÏûÏ¢£º
Sqlcmd:´íÎó:Microsoft SQL Native Cli ......

SQL Server Êý¾Ý¿â¹ÊÕÏÐÞ¸´¶¥¼¶¼¼ÇÉÖ®Ò» ת

SQL Server Êý¾Ý¿â¹ÊÕÏÐÞ¸´¶¥¼¶¼¼ÇÉÖ®Ò»
2010-04-26 10:37:52 À´Ô´:TechTargetÖйú  ÎÒÒªÊÕ²Ø
SQL Server 2005 ºÍ 2008 Óм¸¸ö¹ØÓڸ߿ÉÓÃÐÔµÄÑ¡ÏÈçÈÕÖ¾´«Êä¡¢¸±±¾ºÍÊý¾Ý¿â¾µÏñ¡£ËùÓÐÕâЩ¼¼Êõ¶¼Äܹ»×÷Ϊά»¤Ò»¸ö±¸Ó÷þÎñÆ÷µÄÊֶΣ¬Í¬Ê±Õâ¸öÊý¾Ý¿â¿ÉÒÔÔÚÄãÔ­ÏȵÄÖ÷Êý¾Ý¿â³öÎÊÌâʱÉÏÏß²¢×÷ΪеÄÖ÷·þÎñÆ÷¡£È»¶ø£¬Äã± ......

SQLiteÖв»Ö§³ÖµÄsqlÓï·¨

½ñÌìºÜ×ÔÈ»µÄÔÚдSqlÓï¾äµÄʱºòÓÃÁËTop£¬Ò»¿ªÊ¼Ã»·¢ÏÖÎÊÌ⣬ÒòΪÎÒ´ÓÊý¾Ý¿â¶Á³öµÄÖµÕýºÃÊÇ0£¬¶øÎÒϰ¹ß±äÁ¿¶¨ÒåµÄʱºòÒ²¶¼¸³Öµ0£¬¿ÉÊǵ½ÎÒ²»Òª0µÄʱºòÎҾͷ¢ÏÖÎÊÌâÁË¡£ºóÀ´²ÅÖªµÀ£¬¿É°®µÄСsqlite¾¹È»Óв»Ö§³ÖµÄsqlÓï·¨¡£
¡¡¡¡¿´µ½Ä³¸öÂÛ̳ÓиöÐÂÊÖÒ²·¢ÏÖÁËÕâ¸öÎÊÌâ²¢·¢ÌûÁË£¬ÏÂÃæÒ»Å£È˵Ļظ´ÊÇ“topÊÇÄļҵĹؼü´Ê?s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ