±È½ÏÁ½ÌõSQLÓï¾äÔËÐÐʱ¼ä
create proc dbo.PROC_SQL_COMP @sql1 varchar(8000),@sql2 varchar(8000),@t int
as
/*
µ÷Óãºexec dbo.PROC_SQL_COMP @sql1='',@sql2='',@t=5
×¢£ºÒÔÏÂʱ¼äµ¥Î»Îªms(millisecond ºÁÃë)
±È½ÏÁ½Ìõ¼þSqlÓï¾äÖ´ÐÐʱ¼ä,@sql1¡¢@sql2ΪҪ±È½ÏµÄsqlÓï¾ä,@tΪsqlÒªÔËÐеĴÎÊý£¬½á¹ûΪƽ¾ùÖµ
·µ»Ø: AVG1 @sql1ËùÓÃƽ¾ùʱ¼ä
AVG2 @sql2ËùÓÃƽ¾ùʱ¼ä
DT1 @sql1ËùÓÃ×Üʱ¼ä
DT2 @sql2ËùÓÃ×Üʱ¼ä
TIMES Ö´ÐдÎÊý
*/
declare @dt1 datetime,
@dt2 datetime,
@dt3 datetime,
@dt4 datetime,
@ms1 bigint,
@ms2 bigint,
@i int
set @ms1 = 0
set @ms2 = 0
set @i = 0
--¿ªÊ¼²âÊÔ
while @
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
ÒÔǰѧϰÁËSQLÏà¹Ø·½ÃæµÄ֪ʶ£¬¶ÔÒ²ÄÜÏà¶ÔÊìÁ·Ê¹ÓÃSQL£¬µ«Ëæ׎øÒ»²½µÄʹÓ㬷¢ÏÖ×Ô¼ºËƺõÓÖʲô¶¼²»¶®£¬ÒòΪ×Ô¼ºÖ»ÖªµÀÈçºÎʹÓ㬲»ÖªµÀʹÓõÄÊÇʲôÔÀí£¬ÕâÑùµÄÒ²Ö»ÄÜ˵ÊÇÒ»¸öÊìÁ·Ê¹Óù¤£¬ÏÖÔÚÖØÐÂѧϰһ±é£¬Ï£ÍûÔÚ±ðÈËÎÊÎÒÖ®ËùÒÔÈ»µÄʱºò£¬Ò²Äܻشð¸öÒ»¶þÈý¡£
Ò»¡¢Çø±ðÊÂÎñÓëÆÕͨ³ÌÐòµÄÌØÕ÷ͨ³£ËõдΪACIDÐÔÖÊ
Ô×ÓÐÔ ......
MFCÖÐÓÃado·ÃÎÊSQL Server 2005Êý¾Ý¿â
½ñÌìÀÏ´ó½»´úÏîÄ¿£¬ÐèÒªMFC·ÃÎÊÁíһ̨»úÆ÷É쵀 SQL Server 2005Êý¾Ý¿â¡£MFCÎÒ²»Ê죬SQLÒ²´ÓûÓùý¡£ÔÚÍøÉϲéÁ˲»ÉÙ×ÊÁÏ£¬Ã¦ÁËÒ»ÕóÖÕÓÚ¸ãͨÁË¡£Óë¸÷λÅóÓÑ·ÖÏíһϣ¬¸ßÊÖÃǾͲ»Óÿ´ÁË£¬ÕâÊÇд¸øÏñÎÒÒ»Ñù³õѧÕߵġ£
Ò»¡¢°²×°SQL SERVER 2005£¬ÔÚ±¾»ú½¨Á¢·þÎñÆ÷ĬÈÏ°²×°¼´¿É£¬Ò²¿ÉÒÔ×Ô¼ ......
50¸ö³£ÓÃsqlÓï¾ä
Student(S#,Sname,Sage,Ssex) ѧÉú±í
Course(C#,Cname,T#) ¿Î³Ì±í
SC(S#,C#,score) ³É¼¨±í
Teacher(T#,Tname) ½Ìʦ±í
ÎÊÌ⣺
1¡¢²éѯ“001”¿Î³Ì±È“002”¿Î³Ì³É¼¨¸ßµÄËùÓÐѧÉúµÄѧºÅ;
select a.S# from (select s#,score from SC where C#='001') a,(select s#,sc ......