gpt4 book ai didi

mysql - 谁能帮我写一段sql代码?

转载 作者:行者123 更新时间:2023-11-29 05:28:46 25 4
gpt4 key购买 nike

大家好,我写了一个 SQL 代码,但我想在 phpMYadmin 上运行它,但出现错误:

SQL

CREATE TABLE IF NOT EXISTS 'urls'(
'url' text NOT NULL,
'code' text NOT NUll,
'ip' text NOT NULL,
'visited' int(11) NOT NULL DEFAULT '0'
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

phpMYadmin 问题:

#1064 - 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 ''urls'( 'url' text NOT NULL, 'code' text NOT NUll, 'ip' text NOT NULL, 'visi' at line 1

最佳答案

'' 更改为 `` [你的 url- 表名称周围的反引号]

在 phpmyadmin 测试-

CREATE TABLE IF NOT EXISTS `url`(
`url` text NOT NULL,
`code` text NOT NUll,
`ip` text NOT NULL,
`visited` int(11) NOT NULL DEFAULT 0
)ENGINE = INNODB DEFAULT charset = utf8;

关于mysql - 谁能帮我写一段sql代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17017977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com