检查Access数据库中的表是否存在

时间:2014-06-21 23:38:58

标签: c# sql ms-access

我想检查Access数据库中的表是否存在 我怎样才能做到这一点 ? 我尝试了这个SQL语句,但它返回错误

string SQLSTatement = @"SELECT * as Exists from MsysObjects WHERE type = 1 AND name = 'Table_Name'"

1 个答案:

答案 0 :(得分:1)

您无法使用select * as 'label',只需使用列名或表达式

string SQLSTatement = @"SELECT name as 'Exists' from MsysObjects WHERE type = 1 AND name = 'Table_Name'"
相关问题