gpt4 book ai didi

MySQL 选择表

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

当表名是URL格式时,如何选择MySQL表?

SELECT hash FROM 'http://www.mittelbayerische.de' WHERE time = '1465132682'

这将输出以下错误:

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 ''http://www.mittelbayerische.de' WHERE time = '1465132682'' at line 1

最佳答案

您确定这是表名吗?

无论如何假设是这样,您应该能够使用反引号来引用表名称。

SELECT hash FROM `http://www.mittelbayerische.de` WHERE time = '1465132682'

关于MySQL 选择表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37642450/

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