VB datagrid控件如何显示数据最后10行

通过显示前10行
sql = "select top(10) Type* from " & "table" & " "
QueryString = "where Type ='" & Text3.Text & "'" + "and Date>=#" + Text4.Text + "#"+"order by date"
sql = sql + QueryString
再能过order by desc 排序,可是order by后面只能加字段名,如order by date ,date是字段名,加上desc或asc,运行后就提示错误

请问datagrid控件如何显示数据最后10行

你按照该关键字段降序排列,再用 top 10,不就是了?
温馨提示:答案为网友推荐,仅供参考
相似回答