MySQL 在 Access 中导入 .sql 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4640463/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Import .sql file in Access
提问by user555102
I need to import to Access a .sql database backup file created with MySql .
我需要导入到 Access 一个用 MySql 创建的 .sql 数据库备份文件。
Is there a way to perform this operation?
有没有办法执行这个操作?
回答by Oded
You can't restore a MySQL backup into any other database system.
您无法将 MySQL 备份还原到任何其他数据库系统中。
If you want to import the MySQL data into Access, you could export it all into CSV files and import those to Access. You will still need to recreate relationships, defaults, indexes (?) and other data.
如果要将 MySQL 数据导入 Access,可以将其全部导出为 CSV 文件并将其导入 Access。您仍然需要重新创建关系、默认值、索引 (?) 和其他数据。
回答by Sudantha
You can import SQL Server data into a new Access table. In general, importing is a way to convert data from a different format and copy it into Access. The source table or file is not altered in this process. You can import directly from a SQL Server database using an ODBC connection, a text file exported from SQL Server, or an XML file exported from SQL Server.
您可以将 SQL Server 数据导入到新的 Access 表中。通常,导入是一种将数据从不同格式转换并将其复制到 Access 的方法。在此过程中不会更改源表或文件。您可以使用 ODBC 连接、从 SQL Server 导出的文本文件或从 SQL Server 导出的 XML 文件直接从 SQL Server 数据库导入。
To make frequent import operations more convenient, you can automate them by creating a macro or creating a Microsoft Visual Basic for Applications (VBA) procedure. This is useful, for example, when you import data on a regular schedule or you have unusual or complex requirements for importing data.
为了使频繁的导入操作更加方便,您可以通过创建宏或创建 Microsoft Visual Basic for Applications (VBA) 过程来自动执行这些操作。这很有用,例如,当您定期导入数据或者您对导入数据有异常或复杂的要求时。
回答by Aaron Kempf
if you use SQL Server Management studio then you can open the .SQL files and it will give you help in figuring out what syntax works in SQL -- and which doesn't.
如果您使用 SQL Server Management Studio,那么您可以打开 .SQL 文件,它会帮助您确定哪些语法在 SQL 中有效——哪些无效。
For example, if you have a table name that is mis-spelled, SQL Server Management Studio will give you red squigglies under that table name.
例如,如果您有一个拼写错误的表名,SQL Server Management Studio 将在该表名下为您提供红色波浪线。
I don't see that functionality in Access, and I don't think that it's coming any time soon. Access (Jet) hasn't gotten any new features in almost fifteen years.
我在 Access 中看不到该功能,而且我认为它不会很快推出。Access (Jet) 近 15 年来没有获得任何新功能。