Sub SubtotalPickFile() Dim StartTime As Variant Dim UsedTime As Variant StartTime = VBA.Timer Dim firstday As Date, lastday As Date Dim Wb As Workbook Dim Sht As Worksheet Dim oSht As Worksheet Dim Dic As Object Dim d As Object Set d = CreateObject("
---查看所有存储过程或视图的位置 select a.name,a.[type],b.[definition] from sys.all_objects a,sys.sql_modules b where a.is_ms_shipped=0 and a.object_id = b.object_id and a.[type] in ('P','V','AF') order by a.[name] ASC GO --1.查看所有存储过程与函数 exec sp_stored_procedures -
SQL教程地址:http://www.w3school.com.cn/sql/index.asp TOP 子句 TOP 子句用于规定要返回的记录的数目. 对于拥有数千条记录的大型表来说,TOP 子句是非常有用的. 注释:并非所有的数据库系统都支持 TOP 子句. SQL Server 的语法: SELECT TOP number|percent column_name(s) FROM table_name MySQL 和 Oracle 中的 SQL SELECT TOP 是等价的 MySQL 语
张三 语文 100 张三 数学 83 李四 语文 88 李四 数学 100 查询每个学生的最高成绩. select b.* from (select name,max(score) score from course GROUP BY name) a left join course b on a.`name`=b.`name` and a.score=b.score; 感觉有点不太严谨,但是查询出来的结果是对的. 如果非Mysql上面执行,将字段的引号去掉即可.