Sub 数据库连接() Set Cnn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") Cnn.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=True;User ID=sa;Password=123456;Initial Catalog=运营数据库; Data
AVG (平均) COUNT (计数) MAX (最大值) MIN (最小值) SUM (总合) 运用函数的语法是: selecte "函数名"("列名") from "表格名 1.AVG :select AVG(Grade) from Table1,返回结果:Table1中Grade列的平均值 2.COUNT :select COUNT (distinct Name) from Table1 where Grade>60,返回结果:Tabl
SQL指令 SELECT DISTINCT WHERE AND OR IN BETWEEN LIKE ORDER BY 函数 COUNT GROUP BY HAVING ALIAS 表格链接 外部链接 CONCATENATE SUBSTRING TRIM 表格处理 CREATE TABLE CONSTRAINT NOT NULL UNIQUE CHECK 主键 外来键 CREATE VIEW CREATE INDEX ALTER TABLE DROP TABLE TRUNCATE TABLE I