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

VB+SQL 2000 ʵÏÖÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´

 
'*************************************************************************
'**Ä£ ¿é Ãû£ºfBackupDatabase_a
'**Ãè    Êö£º±¸·ÝÊý¾Ý¿â,·µ»Ø³ö´íÐÅÏ¢,Õý³£»Ö¸´,·µ»Ø""
'**µ÷    ÓãºfBackupDatabase_a "±¸·ÝÎļþÃû","Êý¾Ý¿âÃû"
'**²ÎÊý˵Ã÷£º
'**          sBackUpfileName  »Ö¸´ºóµÄÊý¾Ý¿â´æ·ÅĿ¼
'**          sDataBaseName    ±¸·ÝµÄÊý¾ÝÃû
'**          sIsAddBackup     ÊÇ·ñ×·¼Óµ½±¸·ÝÎļþÖÐ
'**˵    Ã÷£ºÒýÓÃMicrosoft ActiveX Data Objects 2.x Library
'**´´ ½¨ ÈË£º×Þ½¨
'**ÈÕ    ÆÚ£º2003Äê12ÔÂ09ÈÕ
'*************************************************************************
Public Function fBackupDatabase_a(ByVal sBackUpfileName$ _
                                , ByVal sDataBaseName$ _
                                , Optional ByVal sIsAddBackup As Boolean = False _
                                ) As String
                                
    Dim iDb As ADO


Ïà¹ØÎĵµ£º

sql serverÈÕÆÚʱ¼äת×Ö·û´®(ÀÁµÃ¼Ç)

sql serverÈÕÆÚʱ¼äת×Ö·û´®
ÈÕÆÚʱ¼äת×Ö·û´®
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16
Select CONVERT(varchar(100), GETDATE(), 3): 16/05/06
Select CONVERT(varchar(1 ......

Sql»ù±¾Óï¾äµÄѧϰ

--²éѯÿ¸öÈ˶©·¹µÄ´ÎÊý
select  username as ÐÕÃû, count(*) as ´ÎÊý from orderitems  group by UserName having count(*)=1
order by ÐÕÃû desc
select distinct username as δע²áÐÕÃû from orderitems
where username not in (select [Name] from Person)
select distinct username as ÒÑ×¢²áÐÕÃû fr ......

SQL SERVER³£ÓÃÈÕÆÚº¯Êý


1.Ò»¸öÔµÚÒ»ÌìµÄ
Select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)
2.±¾ÖܵÄÐÇÆÚÒ»
Select DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)
3.Ò»ÄêµÄµÚÒ»Ìì
Select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)
4.¼¾¶ÈµÄµÚÒ»Ìì
Select DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)
5.µ±ÌìµÄ°ëÒ¹
Select DATEADD(dd, DAT ......

SQL Server 2000/2005 ·ÖÒ³SQL

SQL ServerÖм¸ÖÖ·ÖÒ³µÄsqlÓï¾ä
·½·¨1£º
ÊÊÓÃÓÚ SQL Server 2000/2005
SELECT TOP Ò³´óС *
from table1
WHERE id NOT IN
          (
          SELECT TOP Ò ......

±£»¤SQL ServerÊý¾Ý¿âµÄÊ®´ó¾øÕÐ

±£»¤SQL ServerÊý¾Ý¿âµÄÊ®´ó¾øÕÐ
http://blog.csdn.net/cncco/archive/2007/09/15/1785880.aspx
1. °²×°×îеķþÎñ°ü
ΪÁËÌá¸ß·þÎñÆ÷°²È«ÐÔ£¬×îÓÐЧµÄÒ»¸ö·½·¨¾ÍÊÇÉý¼¶µ½SQL Server 2000 Service Pack 3a (SP3a)¡£ÁíÍ⣬Äú»¹Ó¦¸Ã°²×°ËùÓÐÒÑ·¢²¼µÄ°²È«¸üС£
2. ʹÓÃMicrosoft»ùÏß°²È«ÐÔ·ÖÎöÆ÷£¨MBSA£©À´ÆÀ¹À·þÎñÆ÷µÄ°² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ