sql Exists in
Ê×ÏÈ£¬ÎÒÃÇ¿´¿´existsºÍinµÄЧÂÊÎÊÌ⣬ÕâÀïÎÒֻ˵Ã÷Ò»ÖÖ²âÊÔÓï¾ä
set statistics io on
sqlstatement
set statistics io off¡¢
»òÕß
set statistics time on
sqlstatement
set statistics time off
´ÓstudioÀïÃæµÄÏûÏ¢¿ÉÒÔ¿´³öÎÊÌ⣬ÎÒÒýÓÃÍøÉϵÄһЩ׼Ôòhttp://www.cnblogs.com/diction/archive/2008/01/18/1043844.html
ÕâÀïÖ÷Ҫ˵Ã÷2¸öÎÊÌ⣺
1.exists Ö÷ÒªÊǸö´æÔÚ¹Øϵ£¬ÒªÃ´´æÔÚ£¬ÔòÊDZíÀïÃæµÄÈ«²¿Êý¾Ý£¬Èç¹û²»´æÔÚ£¬ÄÇôÔòûÓбíÊý¾Ý
2.inÊǼ¯ºÏ¹Øϵ£¬Ò»°ãÎÒÃÇÈç¹ûÒªÓÃin´îÅäclauseµÄ»°Ó¦¸ÃÕâÑù
thisfield in (select thisfield from tb where conditions)
µ«ÊÇexists²»´æÔÚÕâÖÖÎÊÌâ
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
SQL SERVER 2005 ͬ²½¸´ÖƼ¼Êõ
ÒÔÏÂʵÏÖ¸´ÖƲ½Ö裨ÒÔ¿ìÕÕ¸´ÖÆΪÀý£©
ÔËÐÐƽ̨SQL SERVER 2005
Ò»¡¢×¼±¸¹¤×÷£º
1£®½¨Á¢Ò»¸ö WINDOWS Óû§£¬ÉèÖÃΪ¹ÜÀíԱȨÏÞ£¬²¢ÉèÖÃÃÜÂ룬×÷Ϊ·¢²¼¿ìÕÕÎļþµÄÓÐЧ·ÃÎÊÓû§¡£
2£®ÔÚSQL SERVERÏÂʵÏÖ·¢²¼·þÎñÆ÷ºÍ¶©ÔÄ·þÎñÆ÷µÄͨÐÅÕý³££¨¼´¿ÉÒÔ»¥·Ã£©¡£´ò¿ª1433¶Ë¿Ú£¬ÔÚ·À»ðǽÖÐÉèÌØÀ ......
×î½ü´¦ÀíexcelÊý¾Ýµ¼Èëµ½Sql ServerÖУ¬Ê§°Ü£¬±¨´íÈçÏÂ
£º
×÷
ΪԴÁÐ3£¨“²úƷ˵Ã÷”£©µÄÊý¾Ý¶ÔÓÚËùÖ¸¶¨µÄ»º³åÇøÀ´½²Ì«´ó
¡£
ÎÒµÄexcelÎļþÖÐÓÐÒ»ÁнГ²úƷ˵Ã÷”£¬¾ÍÊÇһЩ
ÎÄ×Ö¡£Sql
server´¦Àíµ¼excelÊý¾ÝÁ÷³ÌÊÇÕâÑùµÄ£¬Ëü»áÏÈ´´½¨Ä¿±ê±í£¬ÔÙ°ÑexcelÊý¾ÝдÈ뻺³åÇø£¬È»ºóÔÙ°Ñ»º³åÇøÊý ......
use master
go
if exists(select * from dbo.sysobjects where id = object_id(N'[dbo].[P_KillConnections]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[P_KillConnections]
GO
create proc P_KillConnections
@dbname varchar(200)
as
declare @sql nvarchar(500)
declare @spid nvar ......
¡ö ¿ª·¢Ç°ÒªÇóÅäÖÃ
¡ö Select XML¸ñʽÊý¾Ý
¡ö Insert XML¸ñʽÊý¾Ý
¡ö Updata XML¸ñʽÊý¾Ý
¡ö Delete XML¸ñʽÊý¾Ý
¿ª·¢Ç°ÒªÇóÅäÖÃ
±ØÐë°²×°Oracle¿Í»§¶Ë
°ÑClasspathÖ¸Ïò
classes111.zip ......