简体   繁体   English

Microsoft SQL Server Management Studio 中的表创建和插入数据问题

[英]Table creation and inserting data issues in Microsoft SQL Server Management Studio

I have a very long query for creating a table and inserting values.我有一个很长的查询来创建表和插入值。 However, I am getting some errors which I am unable to comprehend.但是,我遇到了一些我无法理解的错误。 I need a little bit of help from a professional who have good understanding of SQL Server.我需要对 SQL Server 有很好理解的专业人士的一点帮助。

I am attaching link to the query file.我附上查询文件的链接。 Please let me know what changes I have to do to run the file without any error.请让我知道我必须做哪些更改才能无错误地运行该文件。

https://drive.google.com/file/d/1fh-p-My9VaxuNNAs5J1ugWoLxpjrqONq/view?usp=sharing https://drive.google.com/file/d/1fh-p-My9VaxuNNAs5J1ugWoLxpjrqONq/view?usp=sharing

I am running the query file and getting some error which I am unable to comprehend at the moment.我正在运行查询文件并收到一些我目前无法理解的错误。 I need some understanding of what the error is and how to solve it.我需要了解错误是什么以及如何解决它。

The dump is from MariaDB, you are inserting this to SQL Server.转储来自 MariaDB,您正在将其插入 SQL Server。 There are compatibility issues, maybe use MariaDB instead?存在兼容性问题,也许改用 MariaDB?

You can edit the SQL to become SQL Server compatible - like this: (SQL Server doesn't have unsigned types, no innodb etc.)您可以编辑 SQL 使其与 SQL Server 兼容 - 如下所示:(SQL Server 没有无符号类型,没有innodb等)

CREATE TABLE api_logs (
    id bigint   NOT NULL,
    user_id bigint  NOT NULL,
    method varchar(191) NOT NULL,
    uri varchar(191)  NOT NULL,
    data text  NOT NULL,
    created_at datetime NULL DEFAULT NULL,
    updated_at datetime NULL DEFAULT NULL
)  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM