MS-Access中的条件表创建

时间:2022-11-24 11:47:37

Sqlite has the useful "create table if not exists" syntax.

Sqlite具有有用的“create table if not exists”语法。

Is there an equivalent in Access, or (as it looks) do I need to build a separate way of checking first?

在Access中是否存在等价物,或者(看起来如此)我是否需要先构建一个单独的检查方法?

2 个解决方案

#1


I think your question has already been answered here: Access: create table if it does not exist

我认为您的问题已在此处得到解答:访问:如果表不存在则创建表

#2


Why would you want to create a table? If it's for temporary data storage then that's fine otherwise that's usuaally not required.

你为什么要创建一个表?如果它是用于临时数据存储,那么这很好,否则通常不需要。

See the TempTables.MDB page at my website which illustrates how to use a temporary MDB in your app. http://www.granite.ab.ca/access/temptables.htm

请参阅我的网站上的TempTables.MDB页面,该页面说明了如何在您的应用中使用临时MDB。 http://www.granite.ab.ca/access/temptables.htm

#1


I think your question has already been answered here: Access: create table if it does not exist

我认为您的问题已在此处得到解答:访问:如果表不存在则创建表

#2


Why would you want to create a table? If it's for temporary data storage then that's fine otherwise that's usuaally not required.

你为什么要创建一个表?如果它是用于临时数据存储,那么这很好,否则通常不需要。

See the TempTables.MDB page at my website which illustrates how to use a temporary MDB in your app. http://www.granite.ab.ca/access/temptables.htm

请参阅我的网站上的TempTables.MDB页面,该页面说明了如何在您的应用中使用临时MDB。 http://www.granite.ab.ca/access/temptables.htm