access数据库怎么查询表明?

fywindy 2013-07-31 05:15:04

string ShowTable = "select * from sys.all_objects where type = 's'";

为什么这句话总是有错???

access还有没有查询表名的语句呢?
...全文
240 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
---涛声依旧--- 2013-07-31
  • 打赏
  • 举报
回复
请问楼主的Access是什么版本的啊? access中的系统表应该是:MSysObjects,而不是sys.objects
fywindy 2013-07-31
  • 打赏
  • 举报
回复
引用 1 楼 yangsh0722 的回复:

use '数据库'
select * from sys.objects where type=N'U' where name='表名'
我这么用的

 string ShowTable = string.Format("select * from sys.objects where type=N'U' where name='{0}'", e.Node.Text);
还是不行呀
fywindy 2013-07-31
  • 打赏
  • 举报
回复
引用 2 楼 wwwwgou 的回复:
select name from MSysObjects where type=1 and flags=0 http://blog.sina.com.cn/s/blog_7c0f1f3f01010ep1.html
你这个不行我试了
Shawn 2013-07-31
  • 打赏
  • 举报
回复
select name from MSysObjects where type=1 and flags=0 http://blog.sina.com.cn/s/blog_7c0f1f3f01010ep1.html
-Tracy-McGrady- 2013-07-31
  • 打赏
  • 举报
回复

use '数据库'
select * from sys.objects where type=N'U' where name='表名'

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧