--office 2003--如果接受数据导入的表已经存在insert into DemoTable select * from OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=d:/Demo.xls',sheet1$)--如果导入数据并生成表select * into DemoTable from OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;D
最近要查询一些数据库的基本情况,由于以前用oracle数据库比较多,现在换了MySQL数据库,就整理了一部分语句记录下来. 1.查询数据库表数量 #查询MySQL服务中数据库表数据量 SELECT COUNT(*) TABLES, table_schema FROM information_schema.TABLES GROUP BY table_schema; #查询指定数据库表数量 SELECT COUNT(*) TABLES, table_schema FROM information_s
-- 表结构查询 SELECT 表名 then d.name else '' end, 表说明 then isnull(f.value,'') else '' end, 字段序号 = a.colorder, 字段名 = a.name, 标识 then '√'else '' end, 主键 FROM sysobjects where xtype='PK' and parent_obj=a.id and name in ( SELECT name FROM sysindexes WHERE indi
Option Explicit Dim mdl ' the current model Set mdl = ActiveModel If (mdl Is Nothing) Then MsgBox "There is no Active Model" End If Dim HaveExcel Dim RQ RQ = vbYes 'MsgBox("Is Excel Installed on your machine ?", vbYesNo + vbInformation