VBʵÏÖSQL ServerÊý¾Ý¿â±¸·Ý/»Ö¸´
VBʵÏÖSQL ServerÊý¾Ý¿â±¸·Ý/»Ö¸´
http://blog.csdn.net/cncco/archive/2006/05/15/729356.aspx
’**Ä£ ¿é Ãû£º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 ADODB.Connection
Dim iConcStr$, iSql$, iReturn$
On Error GoTo lbErr
’´´½¨¶ÔÏ
Ïà¹ØÎĵµ£º
ÏÖÓÐSQL SERVERµÄÊý¾Ý±í£¨SalesItem£©,SalestemÓÐÒÔÏÂ×Ö¶Î:¿Í»§±àºÅ£¬ÏîÄ¿±àºÅ£¬¿Í»§Æ·ºÅ£¬»õ±Ò£¬µ¥¼Û£¬ÏúÊÛÔ±¡£ÐèÒª´Ó±íÖÐÈ¡³öC145µÄÊý¾Ý£¬ÔÙ°ÑÕâЩÊý¾ÝµÄ¿Í»§±àºÅ¸ÄΪC522£¬ÔÙ±£´æ»Ø±íSalesItemÎÊÌâ²¹³ä£ºÕâÀïÓÐ2²¿·ÖµÄÊý¾Ý£¬C145µÄÊý¾Ý²»±ä£¬»¹ÊÇÓеģ¬C522·ÝµÄÊý¾ÝÊÇ´Ó±íÖÐÈ¡³öC145¿Í»§±àºÅµÄÊý¾Ý£¬ÔÙ°ÑÕâЩÊý¾ÝµÄ¿Í»§± ......
Oracleµ÷ÕûÓëSQL Óï¾äµÄµ÷ÓŵĹØϵ
ÔÚOracleµ÷ÕûÖÐÎÒÃÇ»¹»áÉæ¼°µ½SQL Óï¾äµÄµ÷ÓÅ£¬ÎÒÃǽÓÏÂÀ´¾ÍÀ´¿´ÒÔÏ嵀 SQL Óï¾äµÄµ÷ÓÅ¡£ÎÒÃǶ¼ÖªµÀ Oracle ÖÐµÄ SQL µ÷ÓÅÊÇÒ»¸öÏ൱¸´ÔÓµÄÖ÷Ì⣬ÉõÖÁÊÇÐèÒªÕû±¾ÊéÀ´½éÉÜ Oracle SQL µ÷ÓŵÄϸ΢²î±ð¡£
²»¹ýÓÐһЩ»ù±¾µÄ¹æÔòÊÇÿ¸ö Oracle DBA ¶¼ÐèÒª¸ú´ÓµÄ£¬ÕâЩ¹æÔò¿ÉÒÔ¸ÄÉÆËûÃÇϵͳµÄ ......
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#,score
from SC wher ......
SQL Server ²éѯһÕűíµÄÖ÷¼ü
http://hi.baidu.com/samxx8/blog/item/7048f8de1725835894ee37b4.html
SELECT a.name
from syscolumns a
inner join sysobjects d on a.id=d.id
where d.name='SPF_Users' and exists(SELECT 1 from sysobjects where xtype=' ......