簡體   English   中英

MySQL 查詢未在 Dbeaver 中執行

[英]MySQL query not getting executed in Dbeaver

我有一個 SQL 查詢,它將數據插入到 publishers 表中:

USE PROJECT;

INSERT INTO publishers (email, display_name, first_name, last_name, phone, website, assigned_to, favorite) VALUES ('DorothyJUnzueta@gmail.com', 'Dorothy Unzueta', 'Dorothy', 'Unzueta', '7428730894', 'www.yahoo.com', 'johndoe783@gmail.com', 'false');

但是當我在 Dbeaver 中執行它時,出現了這個錯誤:

SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO publishers (email, display_name, first_name, last_name, phone, websi' at line 3

Error position: line: 2

我無法理解錯誤出在哪里。

如果需要更多信息,請發表評論。

如果 favorite 是 boolean 類型,那么您必須刪除引號:

INSERT INTO publishers (email, display_name, first_name, last_name, phone,
                        website, assigned_to, favorite)
VALUES ('DorothyJUnzueta@gmail.com', 'Dorothy Unzueta', 'Dorothy', 'Unzueta', '7428730894', 
        'www.yahoo.com', 'johndoe783@gmail.com', false);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM