我想检查Access数据库中的表是否存在 我怎样才能做到这一点 ? 我尝试了这个SQL语句,但它返回错误
string SQLSTatement = @"SELECT * as Exists from MsysObjects WHERE type = 1 AND name = 'Table_Name'"
答案 0 :(得分:1)
您无法使用select * as 'label'
,只需使用列名或表达式
string SQLSTatement = @"SELECT name as 'Exists' from MsysObjects WHERE type = 1 AND name = 'Table_Name'"