【发布时间】:2014-01-30 17:01:42
【问题描述】:
我一遍又一遍地看这个,想看看我是否能得到更多的关注。我正在尝试运行创建表查询,但我似乎无法让它工作。我得到的错误是
#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 '`1`, `id_shop` int(11) NOT NULL DEFAULT `1`, `id_lang` int(10) NOT NULL DEFAUL' at line 4
这里是我要运行的查询
CREATE TABLE IF NOT EXISTS `PREFIX_quote` (
`id_quote` int(10) NOT NULL AUTO_INCREMENT,
`reference` varchar(9) DEFAULT NULL,
`id_shop_group` int(11) NOT NULL DEFAULT `1`,
`id_shop` int(11) NOT NULL DEFAULT `1`,
`id_lang` int(10) NOT NULL DEFAULT `1`,
`id_customer` int(10) NOT NULL,
`total_discounts` decimal(17,2) NOT NULL DEFAULT `0.00`,
`total_products` decimal(17,2) NOT NULL DEFAULT `0.00`,
`total_product_wt` decimal(17,2) NOT NULL DEFAULT `0.00`,
`total_shipping` decimal(17,2) NOT NULL DEFAULT `0.00`,
`quote_number` int(10) NOT NULL DEFAULT `0`,
`quote_date` datetime NOT NULL,
`valid` int(1) NOT NULL DEFAULT `1`,
`id_employee` int(11) NOT NULL,
`date_add` datetime NOT NULL,
`date_upd` datetime NOT NULL,
PRIMARY KEY (`id_quote`),
KEY `id_customer` (`id_customer`),
KEY `id_employee` (`id_employee`));
【问题讨论】:
-
我相信这是主题,因为有一个特定的错误消息和代码示例。这不是一般的“为我调试代码”问题。
标签: mysql create-table